May 29, 2008

1

How to survive a day at the office

Hahahah... while reading my email, I receive this funny cartoon especially the Version Two about computer virus. Well, you cannot do this if you are using linux in your office. heheh


Version One

Version Two


Smile and have fun!!

Share This Article:


Bookmark This Article:
Feed Me Digg Technorati del.icio.us Best to Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy




May 27, 2008

0

Linux Shell Script to Compare PID

Just my testing Linux bash script code to compare PID... I'm not really using it yet. But I'm thinking if I can use it to verify that there is running process with the same PID in /var/run/appname.pid on the running process snapshot (ps).


if there is no such PID, maybe I can simply delete the .pid file. And the process which will check for this file can restart as usual.

Here's the content of my ~/pidcmp script:


#!/bin/sh

thepid=`cat /var/run/ppp0.pid`
echo "the pid is $thepid"
spsaux=`ps aux | grep [p]ppd`
okflag=0

gettx ()
{
local IFS=" "
i=0
for tx in $1; do
myarr[$i]=$tx
let i+=1
done
}
NEWLINE='
';
oldifs=$IFS
IFS=$NEWLINE
for line in $spsaux; do
# echo "line: $line"
gettx $line
foundpid=${myarr[1]}
if [ $foundpid == $thepid ]; then
echo "the pid is equal!!"
okflag=1
fi
done

#echo "foundpid: ${myarr[1]}"
IFS=$oldifs

echo "okflag = $okflag"


This is just my idea... The script is working for that purpose but use it at your own risk... Enjoy Linux bash scripting!!

Share This Article:


Bookmark This Article:
Feed Me Digg Technorati del.icio.us Best to Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

0

Downloading Battle Programmer Shirase

Since my post about the Battle Programmer Shirase videos, I'm searching if I can download all episodes... Then I found one good fast completed torrent download...

You can get it too at http://www.animesuki.com/series.php/258.html

My torrent downloads will finish soon...

Share This Article:


Bookmark This Article:
Feed Me Digg Technorati del.icio.us Best to Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy




May 26, 2008

14

Maxis GPRS Connection

I'm putting this here just for my reference. Feel free to ask me on the comment section if you don't understand what I'm talking about... Please note that I'm using TS-7260 SBC from embedded arm which I've installed ts-7000 linux (debian-arm based) on SD card.

I'm using this to have wireless connection fron my Rain Gauge device to the internet. To make internet connection via Maxis GPRS on a Linux computer with ppp dial up connection, we just need some files which is:

  1. /etc/ppp/peers/maxisGPRS
  2. /etc/ppp/pap-secrets
  3. /etc/ppp/chat/maxisGPRS
  4. /etc/ppp/chat/gprs-disconnect

and make sure the ppp and chat package is installed on that box.

To install ppp on debian, you can use
$ apt-get install ppp


Here is the contents of /etc/ppp/peers/maxisGPRS
hide-password
noauth
connect "/usr/sbin/chat -v -f /etc/ppp/chat/maxisGPRS"
disconnect "/usr/sbin/chat -V -s -S -f /etc/ppp/chat/gprs-disconnect"
debug
crtscts
/dev/ttyTS0
9600
defaultroute
noipdefault
user maxis
lcp-echo-interval 0
usepeerdns
maxfail 0


here is the contents of /etc/ppp/pap-secrets
maxis   *       wap     *


here is the contents of /etc/ppp/chat/maxisGPRS
ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
'' ATZ
OK AT
OK ATE0V1
OK AT+CGDCONT=1,"IP","net"
OK ATDT*99***1#
CONNECT ''
'' \d\c


here is the contents of /etc/ppp/chat/gprs-disconnect
# This is called at , (termination of pppd)
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO DIALTONE"
SAY "Sending break to the modem\n"
"" "\K"
"" "\K"
"" "\K"
"" "+++ATH"
"" "+++ATH"
"" "+++ATH"
SAY "PDP context detached\n"


I've tested this and verified that it works on ubuntu Gutsy too... just plug in the Wavecom modem and change the /etc/ppp/peers/maxisGPRS file to use /dev/ttyS0 or any serial port where you plug in the GPRS modem.

to dial the gprs connection, use this command:
$ pppd call maxisGPRS debug nodetach

(I'm using debug nodetach to see the output, you can strip out that two option if you wanna call this from cron or your script)

OK, that's all... Enjoy!!!

Share This Article:


Bookmark This Article:
Feed Me Digg Technorati del.icio.us Best to Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

May 25, 2008

0

Do you trust your downloaded software?

In this Information Technology age, we have a lot of choices from hardware to software in order to solve our daily issues. When we need software, just google up and seek on what you need, maybe you got a free version or sometimes cracked by someone else... It doesn't matter.

The only things that matter is, do you really trust the software that you recently downloaded won't do anything wrong to you? If you have no worries about it before, you may need to read this Jeff Atwood's post about A Question of Programming Ethics on his CodingHorror blog. THen you should think again...

Share This Article:


Bookmark This Article:
Feed Me Digg Technorati del.icio.us Best to Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy




May 24, 2008

1

Battle Programmer Shirase - Episode 1

I just noticed this anime about programmer and programming. Pretty cool because previously I've watched japanese anime about cars which influence people to be like the anime heroes like Inital-D and so on. But that works for car lover. And what about coders or programmers? Worry not, here it comes... Battle Programmer Shirase.




I think I'm really late to know this because it have already aired since 2003. Wow...

The story of Battle Programmer Shirase revolves around a "freelance programmer" named Akira Shirase. He's a very talented, yet mysterious computer programmer. Because of his incredible abilities, he's contacted by several individuals (curiously, all of them are very similar persons named Akizuki Kaoru) to do all sorts of strange computer-related hacking/security jobs. He's a very quiet guy who lives alone in a small apartment near his niece's house. At first, the episodes revolved around some freelance jobs that highlighted his abilities - however, later on in the series, characters came back and offered help or plot twists. The school that Shirase had gone to had been hinted throughout the series, and it finally made an appearance in the last episode, when some of the characters began to show their hidden relationships to the others.

The series' story focus is on computers and ecchi comedy. The original series spans 5 story arcs across 15 episodes of 12 minutes each. According to wikipedia, the series was not continued. Anyway, just enjoy them... and hope there is continuation on this...



You may also love to read:



Share This Article:


Bookmark This Article:
Feed Me Digg Technorati del.icio.us Best to Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

May 21, 2008

0

How to build your own low cost superb wifi booster.

Wireless have been widely used in houses and offices. I'm also using the Linksys WRT54G in my house to allow me to access internet where ever I am in my house. Whether I'm in the living room, on my study room or even at my balcony. However, as my house have 2 floor, I found some spots where the signal is so weak... So, I'm searching on how to boost up the signal without having to buy new Access Point. Then I found this cheap hack to boost my wireless signal. It is a Parabolic Wifi Booster.



I believe this hacks works well as it have many versions and have been widely used by others... You can have a look at this Ez-12 Parabolic Reflector Template that use the same technique. Anyway, I'm gonna try it myself and will post the result soon...

Share This Article:


Bookmark This Article:
Feed Me Digg Technorati del.icio.us Best to Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy