Data visualization quite accurately gives you the center of the table.
Firefox has 2 search bars. Kinda. The address bar and the search box used to be configurable separately so that the search engine chosen for the address bar is irrelevant to the search engine set for the search bar. This behaviour has been disabled in FF23; the search engine selected in the search bar dictates the engine used in the address bar (the keyword.URL parameter doesn’t actually do anything anymore). So those of us who want 2 separate address bars are left out to dry.
UNTIL NOW. The Keyword Search plugin available here solves all your problems.
Happens quite a bit on Windows 7. The Leap Motion device is running nicely for a while, then you unplug it and plug it back in, and boom: no service. Simple solution is to restart the service.
Start > All programs > Accessories > (Right Click ‘Command Prompt’) > Run As administrator
c:\> net start LeapService
If something similar happens on Linux, where the Leap Motion controller used to work and just suddenly stops, check your leap daemon. ensure none of the daemons are running
$ ps aux |grep leapd . Kill all the daemons that are running
$ killall -9 leapd and then restart the daemon
It’s taken me a while to mess around with the Linux RT system, so here’s a somewhat full documentation of what I did. I assume some Linux compiling knowledge and a safe environment to actually do this, such as a chroot environment or a virtual machine or your roommate’s computer who isn’t going to know what happened.
I’ll start with a simple program in C to test the RT Kernel. Get it here, adapted from the official docs’ provided example. You can compile it on your regular stock kernel as such:
$ gcc -o test_rt test_rt.c -lrt
You can then run the program a number of times to see what the minimum run time is.
$ time sudo ./test_rt
My personal record is about 10 seconds on a stock kernel on VirtualBox running a single CPU. However, we know that testing this program on a standard machine with low load is not indicative of a `real` real time system. So we now run our program under high load. But first, we need to simulate that high load:
$ sudo stress -c 1000 -i 100 -m 2 --vm-keep -t 120
(note that the -m 2 uses (2 * 256)MB of memory, so make sure you have enough!)
And then, we’ll run the test_rt program again.
Patching the Kernel
In this example I’m working with kernel 3.8.4. You may want to use a different version of the kernel, in which case look for the highest version of the patch available here: https://www.kernel.org/pub/linux/kernel/projects/rt/
And download the corresponding vanilla kernel here: https://www.kernel.org/pub/linux/kernel/v3.x/
And moving along, here’s how we patch:
- In your home directory go to the Download folder and download the patch file in bz2 format (mandatory for this exercise) and the vanilla kernel.
- Unpack the kernel, and go into the directory
$ tar -xjvf linux-3.8.4
$ cd linux-3.8.4
- Apply the patch
$ patch -p1 < <(bunzip2 -c ../patches-3.8.4-rt2.tar.bz2)
- Configure the kernel using the config file from your existing kernel
$ cp /boot/config-$(uname -r) .config
$ make oldconfig
- when prompted for preemption model, select option 5 – Fully Preemptible.
- When prompted for debug options do not select it. Turning on the debug flags (which is the default option) will decrease performance.
- For every other prompt you can just press which selects the default
- Build the kernel
$ make-kpkg clean
$ CONCURRENCY_LEVEL=$(getconf _NPROCESSORS_ONLN) fakeroot make-kpkg --initrd --revision=0 kernel_image kernel_headers
- Install the .deb files
$ cd ../
$ sudo dpkg -i linux-headers-3.8.4-rt2_0_i386.deb linux-image-3.8.4-rt2_0_i386.deb
- Reboot into your new kernel. Note: the steps above do not make this kernel your default. You will need to select the appropriate kernel from your grub menu
At this point you can try running the benchmarking script again. My record was under 2 seconds, down from the 10 seconds mentioned above.
Note: If your performance actually decreases, you may want to check to make sure your debugging flags were turned off during compile.
This is only relevant if you already have Eclipse IDE, perhaps for developing Java, and you want the relevant C/C++ development plugins. If you are only developing on C/C++, you could just as easily download CDT in a standalone IDE right here
The following is an alternative, which only installs the relevant CDT plugins.
- Start Eclipse
- Help > Install New Software > “Available Software Sites” > “Add”
- Name: CDT, Location: http://download.eclipse.org/tools/cdt/releases/juno > OK
- Now you’re back to the Available Software popup, the first label at the top says “Work With”. Click the drop-down, select CDT (or “All”. Whatever)
- Select the relevant C/C++ tools.
Other plugins you might find useful:
Git stuff: http://download.eclipse.org/egit/updates
Linux Tools – Valgrind, Gprof, etc: http://download.eclipse.org/linuxtools/update
Needed packages (check in order)
(and run some script) sudo /usr/share/doc/libdvdread3/install-css.sh
So some dude from a “Talent Recruitment” company insulted me. Here’s how:
From: Shawn Low
Subject: Career Opportunity
Sent: Thu, Jan 3, 2013 9:24:41 AM
Could you please contact me on my mobile (+6012xxxxxxx) or via email (email@example.com), giving me your present contact number, for a quick chat about a career opportunity?
This is Shawn here from Talentsbay, a headhunting firm. Thanks.
Talentsbay Sdn Bhd (932119-T)
Suite 27-11, Penthouse, Signature Office,
The Boulevard, Mid Valley City,
Lingkaran Syed Putra,
59200 Kuala Lumpur, Malaysia
Mobile: +6012 xxx xxxx
Tel: +603 2297 xxxx
Fax: +603 2287 xxxx
Website: www. talentsbay .com
I wasn’t interested. Partly because I don’t trust recruitment agencies. Mostly because I’ll be in the US for a while. I decided to tell him that. Politely.
Subject: Re: Career Opportunity
From: Dartarrow <me>
Date: Thu, January 03, 2013 9:10 pm
Sorry. Not interested. How do us you find me anyway? I need to remove my online profiles
I’m pretty sure that reply was rather polite. His next reply however sounded like a scorned girlfriend you dumped for a 17yo cheerleader.
From: “Shawn Low”
Subject: RE: Career Opportunity
Date: Thu, 03 Jan 2013 18:48:11 -0700
Sorry, the email must have been sent to you by mistake by my assistant. It was meant for another Alvin, an intelligent, smart, qualified and high-calibre candidate. I do not know how your email could have been included in our privileged list of high-performing candidates.
No signature, no “sent from my assistants iPhone”, no “regards”, no “whoopsies”.
And just as I thought we were getting along
I don’t know how the book recommends, but here’s how i do it. Took a while to figure out:
svn propset svn:ignore "*" cache/classes/
remember the double quotes and backslash at the end.
Also the effects would be available immediately – you’d see the files with “?”s immediately disappear
sudo rmmod wl
sudo modprobe wl
sudo sh -c "\ echo 'deb http://ppa.launchpad.net/slicer/ppa/ubuntu karmic main' \ >> /etc/apt/sources.list.d/mumble.list" sudo apt-key adv \ --keyserver keyserver.ubuntu.com \ --recv-keys 165B2836 sudo aptitude update sudo aptitude install mumble
Malaysian Communications and Multimedia Commission (MCMC) has the job as *the* steering force for Teh Internetz in Malaysia. As far as I remember they have the job of regulating the ISPs which they failed at miserably.
Somebody somewhere lately bestowed upon them the role of witch-hunters, moral-police, and National Hypocrites. Which is about all they’re good for anyway. But now they’re bitching about not finding proof? Did you morons even look? Why don’t you start right here, and here. And while you’re at it:
Do you guys understand just how embarrassing it is that the Communications and Multimedia Commission website does not work?
10 bucks says they’ll blame Indonesian hackers soon.
Testing your webcam is done with mplayer, first though you’ll have to install mplayer as so:
sudo aptitude install mplayer
then fire up mplayer as so but in one line:
mplayer tv:// -tv driver=v4l2:width=320:height=240:fps=200:device=/dev/video0 -nosound
And you SHOULD see your pretty face on the screen. Good Luck.
Another interesting feature available with collectd plugins is the availability to overwrite the `hostname`. This opens up a whole new page to collectd, including what I’m attempting right now which is active checks.
In any case, a sample python plugin which overwrites the `hostname` would look like so:
# Sample Python module to use python plugin import collectd #== Our Own Functions go here: ==# def configer(ObjConfiguration): collectd.debug('Configuring Stuff') def initer(): collectd.debug('initing stuff') def reader(input_data=None): metric = collectd.Values(); metric.plugin = 'python_plugin_test' metric.type = 'gauge' metric.values =  metric.host = 'OverwritenHostname' metric.dispatch() #== Hook Callbacks, Order is important! ==# collectd.register_config(configer) collectd.register_init(initer) collectd.register_read(reader)
Lets assume a few things here:
1. Collectd installation:
2. python plugins
3. plugin file python_plugin_test.py will be in
The relevant corresponding config in /opt/collectd/current/etc/collectd.conf would look something like:
LoadPlugin python <Plugin python> ModulePath "/opt/collectd/current/share/python/" LogTraces true Interactive false Import python_plugin_test <Module python_plugin_test> Test "This" "are" "the" "inputs" </Module> </Plugin>
Dont forget to test your plugins by running
sbin/collectd -C etc/collectd.conf -T If this causes nothing to be printed on the STDOUT, that means your plugins are good.
For this guide, I’ll be showing how to create multiple widgets in one window. The code from Maemo provides you one window with one widget (the button). You cannot add on more widgets to the example just like that. Adding >1 widget to a HildonWindow will still allow the program to compile, however if you run it you will have to expect an error message that looks something like “… as a GtkBin subclass a HildonWindow can only contain one widget at a time; it already contains a widget of type …”
So the alternative is to create one vBox (or hBox) and pack all other widgets (including other hBox and vBox) inside of it. The end result from the sample should be an applicati
on with an interface that looks like this
The blog formatting makes it a bitch to paste my code here, so just download the code into scratchbox environment with something like this:
You should now be able to compile the program with the following line:
gcc hworld.c `pkg-config hildon-1 --cflags --libs` -o hworld
Execute the programe
Take note of how the hbox is prepared and then packed into the vbox. Understanding the interaction is key to your own gui development with C, GTK, and Hildon.
Credit where credit’s due, I stole and modified the code from Maemo’s Wiki
This section shows you how to get started (Your baby steps in N900 development starts by starting up the environment. And gettin some sample codes from the community).
If you’ve already done that, then start up Xephyr (and here’s how). From a terminal first startup the SDK
sudo sh -c 'echo 0 > /proc/sys/vm/vdso_enabled' Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb &
Go into scratchbox
Switch to the x86 environment
sb-conf se FREMANTLE_X86
export the display and start up
export DISPLAY=:2 af-sb-init.sh start
You can then look through this pseudo-maemo-emulator for applications you can install. You can start with the sample widget – the process of which is nicely documented here. Or better yet, write (and compile) your own obligatory Hello World program as documented here
There are 3 Options on how to install the Maemo 5 SDK,
1. The GUI Installer (recommended)
2. Script based installer.
Instruction for both can be found here
3. Manual installation
This is a Manual Installation instruction, covering the installation of Scratchbox, Nokia + Maemo binaries and Xephyr X server – which are the prerequisites for development. The host machine here is Debian based machine. so k/ubuntu will work. I’ve tried this on Kubuntu 9.10 with a 32-bit architecture and can confirmt that it works. I can’t guarantee you it will work on a 64-bit machine.
- Install Xephyr
- Download / Install scratchbox
- Setup Scratchbox
- Setup Mamemo Packages
- Log into scratchbox environment
- Configure the scratchbox x86 and armel target as such:
- Now download the rootstraps:
- Now switch to the x86 target and install the binaries,
- Add the nokia repos
- fix the scratchbox symlinks
- repeat the same for armel architecture
- Startup Xephyr, with the x86 targets pointing the output to it
sudo aptitude install xserver-xephyr
Note: before you start, take note that scratchbox installs by default in “/scratchbox” so make sure you have about 4GB’s in your “/” partition.
sudo sh -c 'echo "deb http://scratchbox.org/debian/ maemo5-sdk main" > /etc/apt/sources.list.d/scratchbox.list'
sudo aptitude update
sudo aptitude install scratchbox-core scratchbox-libs scratchbox-devkit-qemu scratchbox-devkit-debian scratchbox-devkit-doctools scratchbox-devkit-perl scratchbox-toolchain-host-gcc scratchbox-toolchain-cs2007q3-glibc2.5-arm7 scratchbox-toolchain-cs2007q3-glibc2.5-i486 scratchbox-devkit-svn scratchbox-devkit-git scratchbox-devkit-apt-https
in the terminal, first make user you are logged in as your default user. Not the root user. And type:
sudo /scratchbox/sbin/sbox_adduser $USER yesThis is optional, But I’d do it anyway just in case :
sudo ln -s /scratchbox/users/$USER/home/$USER /scratchbox/users/$USER/home/user
sudo sh -c 'echo "nameserver 188.8.131.52" >> /scratchbox/etc/resolv.conf'
sudo sh -c 'echo "nameserver 184.108.40.206" >> /scratchbox/etc/resolv.conf'
You will need to ensure:
1. your group membership is registered in the current terminal
2. VDSO support is disabled,
to do so run these in the terminal:
sudo sh -c 'echo 0 > /proc/sys/vm/vdso_enabled'
/scratchbox/login If this works, you will be inside of the scratchbox environment; and you will see something this in the terminal:
sb-conf st FREMANTLE_X86 -c cs2007q3-glibc2.5-i486 -d perl:debian-etch:doctools:svn:git -t noneit is safe to ignore the warnings here.
sb-conf st FREMANTLE_ARMEL -c cs2007q3-glibc2.5-arm7 -d qemu:perl:debian-etch:doctools:svn:git -t qemu-arm-sb
wget http://repository.maemo.org/stable/5.0/armel/maemo-sdk-rootstrap_5.0_armel.tgz http://repository.maemo.org/stable/5.0/i386/maemo-sdk-rootstrap_5.0_i386.tgz
If networking doesn’t work inside of scratchbox, check your DNS server settings. Unfortunately there’s no `ping` inside of scratchbox so the only way to do this is to edit /scratchbox/etc/resolv.conf from OUTSIDE of scratchbox and paste the following:
nameserver 220.127.116.11From inside scratchbox, paste the same lines to “/etc/resolv.conf”
sb-conf se FREMANTLE_X86
sb-conf rs maemo-sdk-rootstrap_5.0_i386.tgz
sb-conf in -edFL
You’ll need to do some apt trickery here for maemo related items. So first accept the EULA here and copy the URL, paste the it into /etc/apt/sources.list (inside scratchbox) and then:
apt-get updateKeep the url, you will need it later on in this installation
fakeroot apt-get install maemo-sdk-debug nokia-binaries nokia-apps
According to the instructions from maemo you will need to remove a symlink and replace it with a folder so do this in the terminal:
At this point the x86 target is setup, you will need to do the same for the armel target.
edit the file /etc/apt/sources.list and paste the URL that you got previously after agreeing to the EULA
sb-conf se FREMANTLE_ARMEL
sb-conf rs maemo-sdk-rootstrap_5.0_armel.tgz
sb-conf in -edFL
fakeroot apt-get install maemo-sdk-debug nokia-binaries nokia-apps
export DISPLAY=:2And from OUTSIDE the scratchbox environment:
Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb & And you will be greeted with a very reassuring emulator-like environment emulating the Maemo 5 on a Nokia N900 😀
Disclaimer: I’m not encouraging breaking and entering or defacing other peoples websites. Regardless of how dumb they may be or how tempted you are to show your l33t-ness
So the Daily Chilli was pwnd at sometime before Sun Feb 14.
I can’t imagine what the administrators must be thinking, doing this so publicly on a public website. The only thing I could deduce was that the sysadmins sucked. Which could only mean one thing. There will be a phpMyAdmin somewhere. So I looked for in the standard locations and found
This did not work out-of the box for me with Kubuntu 9.10.
`lspci` showed me that the wireless device was:
03:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)
This is messed up. The driver provided by the manufacturer worked fine with the previous kernels and the previous releases of kubuntu (kernel 2.6.28 ). After some googling I found a broadcom driver in the Ubuntu ‘restriced’ repos which is provided by the package `bcmwl-kernel-source`.
So if you have the “restricted” repositories turned on in your machine this will work fine. You’ll just need a reboot
sudo aptitude install bcmwl-kernel-source
Alright my full post on this is really long so here’s a minified version with links to the full text. I never wanted this to be a simple list, because I don’t feel it does justice to the product. So if something mentioned here is new to you, find time to read the full text.
1. the Nokia N900 is not a smartphone read more…
2. It’s not meant to give you “web-like” experience read more…
3. It is not sexay read more…
4. It uses a resistive screen read more…
5. The display is almost entirely landscape read more…
6. The Hardware Keyboard is pretty small read more…
7. Choices of available apps are small and scattered read more…
8. Social Media integration isn’t quite there yet read more…
9. TFT LCD and not AMOLED read more…
10. OGG support is not default read more…
11. The MyDocs partition is on vfat read more…
12. Pluging in the N900 to your laptop will unmount ‘MyDocs’ read more…
13. The Battery life is just as expected (approx 6 hours). read more…
14. It runs on the `armel` architecture and not `arm` read more…
15. Multitasking is awesome read more…
16. The peripherals included are of pretty high quality read more…
17. The hardware is deceptively great read more…
18. Almost anything from linux – now at your palm read more…
19. Yes a terminal comes preinstalled read more…
20. You really own your phone read more…