Sunday, July 24, 2011
Reactivating
Let's see if I can reignite the sparks.
Tuesday, November 24, 2009
How to Make an Offline Repository of Your Own Ubuntu System
- Install Ubuntu using Installer CD/ Live CD
- Reboot
- Connect to the Internet
- Update
- Installing additional packages that you need
- Import the packages in a directory
- Scan the packages and create a file apt-get update can read
- Replicate the repository to portable media
- Add a line to your sources.list pointing at your repository
Tuesday, October 28, 2008
Monday, October 27, 2008
Extracting Similarity Between Two (Text) Files
When you need to find similarity between such files, as far as I know, you need to devise your own script.
This is my oneliner script for such need (assuming files to be compared named file-01 & file-02):
for ((i=1;i<=$(wc -l file-01|awk '{print $1}');i+=1)); do grep $(awk -v a=$i 'NR==a' file-01) file-02 ; done
Ugly, but working...
Monday, October 13, 2008
The Reason
I believe I'll better understand the question of "How"
I need to know why I want to be rich, before seeking the way to be richer
I need to know why I want to be free, before breaking anything that hold me back
I need to know why I want to be happy, before pursuing the happiness itself
But, is it wise to seek the reason of being right, while I am still pursuing the very question of what is truth?
Tuesday, February 05, 2008
Reverse Proxy with Apache
Apache has proxy-related modules to enable this operation. To get it working, you need to enable this modules:
- proxy
- proxy_http
Using Ubuntu 7.10, this modules can be loaded simply by typing:
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo /etc/init.d/apache2 restart
To forward any http request to your internal address, you need to add the destination url into your virtual host configuration, i.e:
sudo nano /etc/apache2/sites-available/yourvirtualhostconfig
then add this line:
ProxyPass /your-public-url/ http://your-private-address
enable your site by typing:
sudo a2ensite yourvirtualhostconfig
sudo /etc/init.d/apache2/restart
By default, in Ubuntu 7.10 all proxy access are denied. Therefore, you
need to white list your address into the proxy.conf file
sudo nano /etc/apache2/mods-available/proxy.conf
change the config to allow your source address i.e:
<Proxy *>
AddDefaultCharset off
Order deny,allow
Deny from all
Allow from 203.153.240.197
</Proxy>
Then reload the configurations
sudo a2enmod proxy
sudo /etc/init.d/apache2 restart
That's it folks. Enjoy working on your devices remotely, securely.
(It is not so secure as the traffic is not encrypted. What I mean by
secure, is that I can hide the private address from any port scan.
Therefore, what is deemed secure by me, is not necessarily secure by
your definition. This is MY blog, so no complain!!!)
Monday, November 12, 2007
Connecting to XL 3G via Sony Ericsson W850i
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 460800
Modem = /dev/ttyACM1
ISDN = 0
Phone = *99***1#
Phone1 = *99***2#
Password = proxl
Username = xlgprs
then, I connect by calling wvdial (with root privillege)
sudo wvdial
Just be very cautious with the cost as it is charged per KB!
Enjoy...
Tuesday, September 18, 2007
Monday, August 20, 2007
Installing ZABBIX 1.4.1
ZABBIX 1.4.1 up and running. (Assumed there is already Apache2, PHP and MySQL running)
1. First, get the source code.
$ wget
http://optusnet.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.4.1.tar.gz
2. Extract the source code
$ tar -xvvzf zabbix-1.4.1.tar.gz
3. Prepare MySQL. by creating database for ZABBIX
$ mysql -u<username> -p<password>
mysql> create database zabbix;
mysql> grant all on zabbix.* to <username>@localhost identified
by '<mysqlpassword>';
mysql> quit;
$ cd <path-of-your-zabbix-source>/create/schema/
$ cat mysql.sql | mysql -u<username> -p<password> zabbix
$ cd ../data
$ cat data.sql | mysql -u<username> -p<password> zabbix
$ cat images_mysql.sql | mysql -u<username> -p<password> zabbix
$ cd ../..
4. Configure the source code, then proceed with install
$ ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl
$ sudo make install
5. Create zabbix config files
$ sudo mkdir /etc/zabbix/
$ sudo cp
<path-of-your-zabbix-source>/misc/conf/zabbix_server.conf /etc/zabbix/
$ sudo nano /etc/zabbix/zabbix_server.conf
6. Create directories for the frontends
$ sudo mkdir /usr/local/zabbix
$ sudo chown -R <username.username> /usr/local/zabbix/
$ rsync -rvu <path-of-your-zabbix-source>/frontend/php /usr/local/zabbix/
7. Edit Apache2 config file to point your own ZABBIX url into the frontend's
path
8. Open a web browser, go to your ZABBIX url, then proceeds from there
9. To get ZABBIX up, you need to execute zabbix_server.
Done :-)
Monday, July 30, 2007
Wednesday, January 03, 2007
Friday, December 22, 2006
Bimbo - Semalam di Malaysia
dari rantau
bertahun-tahun di
negeri orang
oh, Malaysia
oh, dimana
kawan dulu, kawan dulu
yang sama berjuang
oh, Malaysia
kekasih hatipun
telah pula hilang
hilang tiada pesan
aduhai nasib
apakah daya
cita hampa
jiwaku merana
mana dinda
inilah kisahku
semalam di Malaysia
diri rasa sunyi
aduhai nasib
apakah daya
aku hanya
seorang pengembara
yang hina
Friday, November 17, 2006
It works!!!
Now...if only I could make use of that f***in' flyin' windows key ...
Thursday, November 16, 2006
Edgy upgrade fail on acpid
everything that depends on it.
After several hours of googling... I found the answer from launchpad.
The workaround are:
1. Shutdown the acpid (I removed it instead)
2. sudo killall hald
3. sudo dpkg --configure -a
4. sudo apt-get install acpid
Perhaps 4 months is a bit too short for a release cycle of a distro as
massive as Ubuntu...
Mounting Remote Directories using SSHFS
To access it, I mount it using sshfs. Here is how I did it in Ubuntu 6.06.
$ sudo apt-get install sshfs
$ sudo modprobe fuse
$ mkdir /somewhere/localfolder/
$ sshfs -o allow_other user@remotehost:/somewhere/somefolder /somewhere/localfolder
To unmount it just use the normal umount command
$ sudo umount /somewher/localfolder
Now I have edgy repo, shall I start upgrading now... ?
I heard some bad rumors about upgrading dapper to edgy.
I think I need to do some backup first.
Tuesday, November 14, 2006
screen bash
Hence, bash must go first :-)
It's also quite handy to hide whatever I am doing on the screen as I only need to press C-a d to detach it.
Monday, November 13, 2006
Lust : Feature or Bug
If it is a bug, then we are still in development stage and shouldn't have been released yet.
If it is a feature, then why some of us must go to hell because of it?
A: Well, probably deep inside our heart, there are lots of things that was meant to be patched by ourselves.
Hmm... a self-repairing apps...
Thank God we're not running Vista :p
Friday, November 10, 2006
pmount vs perl
The remaining space is quite large, so I put dapper & edgy as the target and start executing the script.
*bam*
myscript: /usr/bin/perl: bad interpreter: Permission denied
what the h###?!
I am absolutely sure I have no problem with permissions as the same script also copied into the parent directory of
a running ubuntu local ftp repository, and it works.
After checking every possible permission problem I encountered, I finally came into mount permission.
I mounted the portable hd using pmount (it's a usb-connected external hd) and it turnout that the default parameter
used by pmount include a noexec option, therefore, when I mounted it using the classic mount, the script worked.
Now, one question remain...
How come a perl script is considered a binary executable, while bash script is not?
Hmm...
Blogging via mutt
In blogspot, one can post his/her blog via mail. I like this feature because of two reasons :
1. The built in blogspot editor is terribly *cough*bloated*cough* slow
2. Due to aging hardware, opening firefox in my laptop takes zillion years
The problem is, the reason #2 is also the reason why I hate opening evolution in my laptop.
Few days ago, I installed mutt. The setup is not perfect yet, but I found myself quite enjoying it.
It loads extremely fast... that I only keep evolution just for reading html-formatted-mail sent to me.
I can also deal with junk mails much better :-)
Thursday, November 09, 2006
Patching debmirror...
I wonder if I can modify it to make it faster.
* searching google with keywords: perl tutorial*