html code snippets

use <code>...</code> for inline code snippets
use <pre>...</pre> for block code snippets

design your internal css styling
ref: http://w3schools.com/html/html_css.asp

for example, mine is
<style>
  code {background:lightgrey;padding:0px;color:black;}
  pre {width:99%;background:lightgrey;padding:0px;color:black;}
</style>

test in w3schools sandbox
http://w3schools.com/tags/tryit.asp?filename=tryhtml_pre

edit your blogspot template, and insert your internal css styling within the <head>...</head> tags

blogger --> Template --> Edit HTML

parse your code, if you see it interpreted
http://blogcrowds.com/resources/parse_html.php

debian stretch kernel compile

prerequisites

# apt-get install linux-source
current kernel source

# apt-get install build-essential
required to build debian packages

# apt-get install fakeroot
root not required, not recommended, to build packages.

tools
# apt-get install libncurses5-dev
for menuconfig

# apt-get install pkg-config libqt4-dev
for xconfig

# apt-get install libglade2-dev libgtk2.0-dev
for gconfig
unless you use/prefer gnome, not worth installing bloatware dependencies.

environment
$ mkdir ~/kernel
$ cd ~/kernel
$ tar -xaf /usr/src/linux-source-{version}
$ ln -s linux-source-{version} linux
$ cd linux
$ cp /boot/config-{version} .config
$ make oldconfig

build
$ make menuconfig
$ make clean
$ nice -n19 make -j3 deb-pkg LOCALVERSION=-nixventure

if you get such warnings
warning: File::FcntlLock not available; using flock which is not NFS-safe
ignore them, or
# apt-get install libfile-fcntllock-perl

install
a successful build at the end of make about half-a-dozen files in the parent directory. the most interesting to us is the kernel (linux-image-*.deb), and perhaps the headers (linux-headers-*.deb).

$ sudo dpkg -i ../linux-image-{version}.deb

dpkg will trigger an update of your bootloader. all you need to do now is reboot, and test your brand new shiny kernel.


patch
$ apt-cache search linux-patch
$ apt-cache search kernel-patch
# apt-get install {linux/kernel}-patch-{??}
$ cd ~/kernel/linux
$ make clean
$ zcat /usr/src/kernel-patches/diffs/*/*.patch.gz | patch -p1

ubuntu phone touch emulator

disappointed with android bloatware getting worse, incompatible releases, and an unstable roadmap.

i was an early android adopter, actively contributing to firmware development. we wanted to make android slimmer, a minimalist system focussing on extracting more battery life and performance. but the bells & whistles lobby won! alas, over the years, i've seen android (particularly the google stacks) become more & more bloatware, only suitable for higher end devices. which means every year or so, you need to buy the yet another new/expensive device just to continue running with android.. unless you are a hacker, know your way around the internals, and not concerned with losing the warranty.

every android release seems to be incompatible with existing versions. if you can't update your phone, you end up with an expensive paperweight. so my recommendation is to purchase the cheapest android device you can live with this year.

windows10 promises updates for the life of your device, unlike android devices which get abandoned soon as you've purchased them. i've seen seemless upgrades from win8 to win10, increasing my confidence in the product. but for the notoriety and past tactics of microsoft!

looking at opensource linux alternatives for mobile devices

the only feasible alternatives i see currently on the horizon are linux devices. there seems to be a few running in the fringes. none yet anywhere near mainstream.

emdebian seems to have lost track somewhere, and become abandoned :-( despite showing great promise some years ago.

ubuntu phone emulator
ubuntu wiki: http://wiki.ubuntu.com/Touch/Emulator
image server: http://system-image.ubuntu.com
quickstart: http://davidplanella.org/ubuntu-emulator-quickstart-guide

an emulator is a wonderful starting point & showcase to demonstrate to the world, and allows a massive userbase to get comfortable with something new, without bothering to purchasing a device, and ending up with an expensive paperweight.

for most devs, an emulator allows them to hack without bricking any equipment. opensource allows most users to support themselves and/or their peers, reducing expensive support costs/infrastructure. bugs are quickly found & fixed by volunteers!

to ubuntu's credit, they have released emulators for stable (current release, necessary for supporting existing user base) and devel (future releases, necessary for supporting roadmaps) channels.

unfortunately, these emulators are restricted to ubuntu installations only. even more unfortunately, they don't work for most people who have taken the trouble. it seems only the ubuntu devs who released these emulators use them successfully!?

try it! let me know, if you have better luck.. :-)

# apt-get --install-recommends install ubuntu-emulator
only in this instance. usually i never install recommends.

before you create an instance, understand the directories used, and ensure enough diskspace.

~/.cache/ubuntuimage contains images you downloaded
~/.local/share/ubuntu-emulator contains instances you created

the devel channel is unstable, and has too many problems unless we are bug testing/fixing. so we use the stable channel.

$ sudo ubuntu-emulator create {myinstance} --arch=i386 --channel=stable
downloaded >2G in .local/share/ubuntu-emulator. ensure target dir has enough diskspace.

$ ubuntu-emulator run {myinstance} --scale=0.7

first run only. wait till init complete.
$ adb shell sudo shutdown -h now
$ ubuntu-emulator snapshot --create=pristine {myinstance}

use as normal now.
$ ubuntu-emulator run {myinstance} --scale=0.7

devel channel build has too many errors. adb device always offline.
stable channel seems more.. er stable..er. adb connects as expected.
neither successfully came up with an interface. just a black window.

if canonical wants ubuntu phone to become more popular, and i would like it so, the least they can do is release a stable emulator/product, which works for most devs. unless the opensource community gets behind this, it is simply not going to take off.

to become more mainstream, the emulator should be made more widely available, for example on debian.

wpa_gui

how did i not discover this earlier :? such an efficient tool! no loitering binary/cryptic config files all over the system, or bloatware dependencies like networkmanager.

debian

# apt-get install wpagui

# vi /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
fast_reauth=1
ap_scan=1
update_config=1

two things to note in the above file:
1. update_config=1 to allow users to change config. if not, make it 0.
2. users need to be in netdev (or relevant group, need not be netdev).

$ wpa_gui launches a gui window, and a systray icon. click on the systray icon to show/hide the gui. closing the gui window will not close the app.

$ wpa_gui -t starts with gui hidden, which is probably what you want in startup scripts.

wpa_gui will create a new instance each time you launch it. you will see yet another systray icon.
closing the gui window merely hides it. hide/unhide by clicking the systray icon.
quit from the menu. the systray icon will disappear.

quitting wpa_gui terminates the wpa_gui instance only, and will not terminate/affect network connections.

and finally, networkmanager has been purged from my systems.. what a relief at so much cruft gone! if we don't need all the features, using a smaller/lighter tool is much more efficient.


gentoo
recompile wpa_supplicant with the qt4 flag, and wheel group in conf.
wiki says either qt5 or qt4. but i couldn't qt5 it.
# USE="qt4" emerge --ask wpa_supplicant

arch
network group in conf
# pacman -S wpa_supplicant_gui

most popular posts