APE-Project How To: Build Server-Side Module in C to use with Javascript

Building a server-side javascript module is documented here (http://www.ape-project.org/wiki/index.php/How_to_create_a_server_Module), while building server-side modules in C is considered deprecated or at least not the best idea (it is not documented at all!). Programing in javascript is all fancy and stuff, but what are you supposed to do if you need Postgres, Memcached or something like that? For C (and C++) there is tons of libraries available, APE-Project is based on C, so maybe we could do something about that. Read on if you’re interested.

Continue reading ‘APE-Project How To: Build Server-Side Module in C to use with Javascript’ »

Reboot to Windows shortcut for Ubuntu 9.10+ (Grub 2)

If you’re dual booting Ubuntu and Windows, a simple shortcut “reboot to windows” might come in handy, so you don’t have to stare at the screen waiting for the boot loader to show up.

This shortcut sets Windows as default grub option only for one reboot, so next time you start up the pc or reboot it from windows the default is back to Ubuntu.

Step By Step:
1. Open terminal (Applications -> Accessories -> Terminal)
2. Type “sudo gedit /etc/default/grub” and hit return
3. Change “GRUB_DEFAULT=0″ (or whatever the value is) to “GRUB_DEFAULT=saved” (you might also want to lower the GRUB_TIMEOUT value)
4. Save & Close gedit
5. Type “gedit ~/win-reboot.sh” and paste the following code into gedit (change ”Windows 7 (loader) (on /dev/sda1)”  to the name or number of your Windows option in grub, you can check that by serching for windows keyword in /boot/grub/grub.cfg)

#!/bin/bash
grub-set-default "Windows 7 (loader) (on /dev/sda1)"
sed -i s/'${chosen}'/0/g /boot/grub/grub.cfg
reboot

6. Save & Close gedit
7. Type “chmod +x ~/win-reboot.sh” to allow execution of this file
8. Type exit or hit Ctrl+D to close the terminal

–If you are using Gnome (default Ubuntu desktop) you can proceed to step 9 to create the shortcut, but ~/win-reboot.sh should work already–
9. Right click on a gnome panel and select “Add to panel”
10. Select “Custom Application Launcher” and click “Add”
11.  Fill out the form like this (replace “/home/ziga/” with your home directory, you can find that out by opening terminal and typing “cd;pwd”):

Windows Reboot Launcher Properties
12. Click the shortcut, type your password and let it work

Please comment if you encounter any problems or have any additional questions.

#!/bin/bash
grub-set-default “Windows 7 (loader) (on /dev/sda1)”
sed -i s/’${chosen}’/0/g /boot/grub/grub.cfg
reboot
Reblog this post [with Zemanta]

Replacing LCD on Asus Eee 1000H

Yeah, I broke my eee’s lcd -.- hardware yay… not :P

I’ve ordered one from ebay two weeks ago and got it today. They’ve charged me extra 17€ for vat and some other unknown expenses >.< But anyway, here it is:

eee - new lcd

Next step, of course, is to disassemble eee immediately!

eee - boomkaboom eee - motherboard motherboard (PCB MADE IN CHINA)

Throw the old lcd away, connect the new one… and…

eee - too big this lid is too small!!! eee - yay false alarm :P

And thats all. Pretty simple. Just connect the keyboard back with fancy connectors, screw back some screws…

eee - final whoa, looks like eee again (got keyboard working in 2nd try)

Now I only hope that this one will stay in one piece for a while (current record is less than 1 year).