I am that geek who is working in the programming field, in love with poetry, always appreciate good lyrics and addicted to loud music.
[Kubuntu]: Connect To Wireless Through Command Line
KDE 4.3 once again gave me a hard time. KNetworkManager crashed every time I tried to run it. It has something to do with segmentation fault.
Frustrated, I decided to find a way to connect to wireless using command line. After long hours of Googling, I found the solution.
First, you need to list available interfaces:
-
shidi@euphoria:~$ sudo iwlist scanning
and this will show something similar to the following:
lo Interface doesn’t support scanning.
eth0 Interface doesn’t support scanning.
eth1 Scan completed :
Cell 01 – Address: 00:97:3G:G1:17:D4
ESSID:”MYNETWORK”
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.412 GHz (Channel 1)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=77/100 Signal level=-49 dBm
Extra: Last beacon: 364ms agopan0 Interface doesn’t support scanning.
Tags: command line, kde 4.3, konsole, kubuntu, network
[Kubuntu]: Digikam Failed To Work With KDE 4.2.9
I have recently upgraded my KDE version to 4.2.9. This however caused a problem with Digikam, it failed to load the thumbnails of selected albums.
I found a quick fix for this by adding new repository to your aptitude source list. Those repository are:
deb http://ppa.launchpad.net/digikam-experimental/ppa/ubuntu jaunty main deb-src http://ppa.launchpad.net/digikam-experimental/ppa/ubuntu jaunty main
The source file can be found at /etc/apt/sources.list. Once you have edited and saved the file, run the following command:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xbf860d3661fbbba575be617f0bf0f083e353b3e9
The final thing to do is to run the following command:
sudo aptitude upadate and sudo aptitude safe-upgrade.
Tags: bugs, digikam, kde, kde 4.2.9, kubuntu, ubuntu
PHP + MySQL + cURL: Single Sign On With Multiple Domains
Recent challenging task I received from BitterCoffee (BC) is to create a Single Sign On. Sounds simple but pretty challenging as the other host which provides another application have a totally different database structure. Login process will be done on BC’s site then users will click on a link to go to the other site.
Session will most likely not to work. I thought of using JSON but I failed to figure out how to make the Javascript to be dynamic as I always prefer to use jQuery (if you have an idea, feel free to share). In the end, I decided to use PHP along with MySQL and cURL.
We will first start by creating a table to handle the login session:
-
CREATE TABLE IF NOT EXISTS `sso_login` (`user_id` int(11) NOT NULL)
Purpose of the table is to store logged in users and remove then upon signing out.
Next is the PHP script which will insert new user id upon signing in (file name: register.php):



