January, 2008
- 89 reads
- 88 reads
- 93 reads
- 1600 reads
Bangladash Linux User Alliance
Submitted by jmarki on 1 January 2008 - 2:07am- 89 reads
- 92 reads
Happy New Year!
Submitted by jmarki on 1 January 2008 - 12:40pmIt's the beginning of a new year!! And what a happening year 2007 was...
I graduated, for one. That's a big big thing!! After 4 years of very very hard work, I finally managed to graduate. Yeah!!
Then I got a job almost immediately at National Cancer Centre Singapore as a network administrator. Basically in charge of the computation servers and SAN for one of the bioinformatics group there. Wee~
And yes, got to travel twice this year, both to Malaysia (poor bloke, what to do?). Must try to post in the travel journal.
Hmm... Some new year resolutions are in order, I think...
Resolutions:
- Must not work so hard. Working till midnight every day will definitely make me burn out very soon
- Must chant every day. I seem to be slipping
- Must clear all my leave this year. That's what leave is for what
- Must blog more often
- Must play games. I still haven't finish chapter 1 of neverwinter nights 2. Damn
Trackback URL for this post:
- jmarki's blog
- 235 reads
New Year, New Blog, New Features!
Submitted by jmarki on 1 January 2008 - 2:02pmWee~, I have ported the old blog into this new one. It's still Drupal.
The previous site layout and tags don't make much sense, especially since I started working, hence the makeover.
New features:
- Search now powered by Google
- Shoutbox!! Finally...
- Technorati tag cloud
- Many posts are now in organised into books: Code repository, Cool applications, Linux/Solaris tips and tricks, Travel journal, Wee~ gadgets.
- Code Repository now contains all my scripts and programs.They are even revisioned!
- New theme, and new logo (thanks UTHSCSA for the picture.
) - Trackbacks are in
- Blogroll updated. Anyone wants to be in?
Do leave shouts and comments everywhere (legitimate ones, please). 
Any comments about the site?
Trackback URL for this post:
- jmarki's blog
- 225 reads
- 67 reads
WTF!!! Live Electrical Current Fun In Pool Party
Submitted by jmarki on 8 January 2008 - 10:02amWin. Can anyone be so dumb as to do this?!
[Gizmodo: How to win a Darwin Award: Float a live surge protector in a pool on flip flops]
If you really don't know why that's moronic, here's a good explanation by trotskysghost:
I'm an electrical engineer and I did my internship working at an amusement park with several water slides. I am VERY well aquainted with electricity and pools. If a grounded plug strip such as that were to be submerged, it would electrify the entire volume of water in that pool. The return path to ground would likely be through the plug strip's own grounding pin. The rubber material of the pool would PROBABLY insulate the pool water from the ground, but not all plastic is an insulator. I actually had a problem where a plastic was conducting enough of a leakage curent to throw off electronic water quality sensors.
In the US the National Electric Code (NFPA 70) requires the use of Ground Fault Circuit Interupters (GFCI) on all cicruits that are likely to come into contact with water, and I am pretty sure that the IEC also requires the use of GFCIs. It takes very little current across the heart to kill someone, approximately 0.04 Amperes, and seeing as most circuit breakers are rated at least 10 amperes, you do the math.
People die everyday from electrocution by 110/220V AC. Even experienced electricians who take the proper safety percautions are not always safe.
How moronic can people be?!?!
Trackback URL for this post:
- jmarki's blog
- 348 reads
Bash Scripting Tips
Submitted by jmarki on 12 January 2008 - 12:43amI went looking around for bash scripting tips, especially secure coding of bash. Can't find much information, so decided to consolidate whatever I found here. 
- Salt string comparisons of variables to increase security
if [[ "a$?" == "a4" ]]; then
- Use the full paths to any binaries, either by hardcoding them into the script or use variable substitution. This prevents the script from executing incorrect/rogue binaries in the path.
/bin/grep "hardcoding the full path" * echo=/bin/echo ${echo} "From bash manpage under EXPANSION: The order of expansions is: brace expansion, tilde expansion, parameter, variable and arithmetic expansion and command substitution (done in a left-to-right fashion), word splitting, and pathname expansion." - Change the environment path at the start of the script to ensure no rouge directories are in the PATH
#!/bin/bash # comments PATH=/bin:/usr/bin
- Write a function to explain the usage of the script
function print_usage () { ${echo} " $0 Usage: $0 [-a opts] [arguments] or $0 -h Description: Something fishy Options: -a opts (Optional) Options -h (Optional) Help arguments Smelly smelly fish " } - Here's a sample code snippet to process script options
if [ $# -lt 2 ]; then print_usage exit 1 else while getopts ha:b: options; do case "${options}" in h) print_usage exit 1 ;; a) flag=${options} ;; b) flag=${options} ;; *) echo "default case, everything else fits here" ;; esac done shift $((${OPTIND} - 1)) - Variables should be enclosed in parenthesis when used, to indicate exactly which variable you are using. Of course, this can prevent an exploit involving longer variable names.
a=erie ab=were if [[ "${a}b" == "erieb" ]]; then
- Printer-friendly version
- 294 reads
Vegetarian tastes
Submitted by jmarki on 20 January 2008 - 1:15amRecently, I'm starting to realise how much my vegetarian diet has changed me.
The smell of meat now smells very pungent, to the extent I sometimes have to avoid sitting close to people eating strong smelling bowls of meat. Things like cheeseburgers, or "lo mai gai" are especially bad.
Tastebuds have also changed. EU and I sometimes buy plates of nice things to share during meals. During the recent Malacca trip, we shared a plate of vegetarian oyster omelette. It was very delicious to me, as a overwhelming weird taste (?taint?) in the non-vegetarian version is gone. EU feels something is gone though, he doesn't like it.
And to top it all, a few days ago during a discussion during work, someone started eating a banana... And I got very, very, very hungry... Kaoz... Hunger cravings over a banana!!
I am vegetarian for almost 3 years... What other changes are on the horizon?
Trackback URL for this post:
- jmarki's blog
- 141 reads


