Posted by: jpatiani | January 19, 2010

Bash Trick: string modifiers

Why doesn’t bash have csh variable modifiers?

Posix has specified a more powerful, albeit somewhat more cryptic, mechanism cribbed from ksh, and bash implements it.

${parameter%word}

Remove smallest suffix pattern. The WORD is expanded to produce a pattern. It then expands to the value of PARAMETER, with the smallest portion of the suffix matched by the pattern deleted.

x=file.c

echo ${x%.c}.o

–>file.o

Read More…

Posted by: jpatiani | December 19, 2009

Upon the DCL Installation

What is DCL?
The simple answer, DCL is another Geophysical graphic library. This library is developed by GFD Dennou Club. Well, I’m not gonna talk about the library and the developer further. If interested about those think, the information can follow in their link here.

Like other open source software, the standard installation step are;
- configure
- make
- make install
You’ll be so lucky if this happen. Unfortunately, sometime the installation not run as we expect. At least, there are some problem that I have deal with.
Read More…

Posted by: jpatiani | December 8, 2009

Ruby kill me part 1: $LOAD_PATH

So you’re not root now, what you have to do if you want a program that not in your system. Of course, the answer is install by yourself. Yeah, install a program is rather easy then configure itself. Like this example:
I have already install irb which is ruby interactive environment but I can not use it because require module not on the list of search able directory.

To solve this problem you can easily modify the irb script by added $LOAD_PATH at the beginning of script. For example like my modified irb script below:

#!/usr/bin/ruby1.8
#
# irb.rb - intaractive ruby
# $Release Version: 0.9.5 $
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
$LOAD_PATH << '/home/jpatiani/lib/ruby/1.8'
require "irb"

if __FILE__ == $0
IRB.start(__FILE__)
else
# check -e option
if /^-e$/ =~ $0
IRB.start(__FILE__)
else
IRB.setup(__FILE__)
end
end

Thank God found this simple solution. I found it here

Posted by: jpatiani | February 6, 2009

Playing with FB

Just wanna test badge from facebook

Joe Patiani's Facebook profile

Seem the picture not coming up. Daaa, what wrong with this.

Posted by: jpatiani | August 1, 2008

Up Again

Like I wrote yesterday that the email server was down, today it’s up again. My feeling was right, the error was not at my side. Error was happened in center DNS. Somebody accidentally made mistake when edit the dns record. I didn’t who’s that, hope that it was not myself.

Everything just work fine and I can sleep well tonight.

PS:
when set relayhost in postfix use IP don’t use hostname.
If hostname is used, it will be error with message “Name or service not known”.
At least it’s happen to me.

Posted by: jpatiani | July 31, 2008

Creepy Thursday

Today seem everything goes wrong. Complain due to email malfunction still continued. My deduction point to problem in upper network, which is ITB network. Network unreachable when access from outside network. Here, I use network from XL to test it, and the same thing happen when access from Speedy.
Right now, I still can’t figure out where the problem source. May be due to black out last Tuesday, or may be another reason, I don’t know. So, until this noon geoph mail wouldn’t accept email from outside network. Hope this over soon.

Well, that was the bad news. Fortunately, not only bad news I also have the good one. My script from last Wednesday work well. The script for the lazy person that what I call this. The script mainly contains wget and sed command. Small script, but good one.
This script divided into to two part. First part, download full index.html with contains list name of file in current folder. Second, manipulate the index.html and then download the needed file.

May be this step seem to be complicated. Because wget actually can choose what we want to download. But in this case I don’t see this work. So this tricky work fine for me.

Posted by: jpatiani | June 26, 2008

Update php 5.2.6 on SLES 9

SLES 9 is some what incomplete OS especially in php software for x86_84 arch. There are some php extensions missing in this release, such as iconv. I realized this when install Mailbee Webmail. At the beginning it was very tragic problem, because I’m so lazy to think how to solve the problem. And beside there is no rpm package for this missing ext available in the internet. But still the show must go on and the problem need to be solve. Another importance is that in other webapplication (gdl) php5 required therefore the application work normally.

So I brave my heart not just only fill the missing ext but also completely change the system. The newest php installed in the SLES 9, at that moment php 5.2.6 was the newest.

Before install php there is important note that newbies like I’m need to pay attention. That is if we want to install complete package, first of all we need install library. For example, if we want install mhash support so we need to install mhash-devel first. And so on. Read More…

Posted by: jpatiani | May 8, 2008

I Luv SuSE

Today I feel very lucky. My terrible mistake that happened last Sunday. The problem began when I want to upgrade PHP from v4 to v5. And that would need upgrade glibc too. So work began with upgrading the glibc and it was successfully. PHP5 was also installed successfully. But when call the program it turn error with message:

php5 -: symbol lookup error: -: undefined symbol: xmlParserInputBufferCreateFilenameDefault

Well that was very frustrate. And all must be turn back to normal. No other choice better than downgrade the glibc. Suddenly everything lost control and system became unstable. The message was:

INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: Id "1" respawning too fast: disabled for 5 minutes

Well well well another problem rose :( . Time to rest.

And today, after I feel this is my day because I can solve the CMAQ installation that has been long time troubled one of my lab friend, Hengki, I came to server room to reinstall the server. But after I check that there is option for repair the system I cancel reinstall plan. With just single simple click to “Automatic Repair” everything back normal. Thank God.
And I just more Luv SuSE ;)

Posted by: jpatiani | May 8, 2008

More POP3 command

Here the complete command use in pop3 shell.

USER userid
This must be the first command after the connect. Supply your e-mail userid (not the full e-mail address). Example: USER john.smith

PASS password
This must be the next command after USER. Supply your e-mail password. The password may be case sensitive.

The following commands may be used as needed:

STAT
The response to this is: +OK #msgs #bytes Where #msgs is the number of messages in the mail box and #bytes is the total bytes used by all messages. Sample response: +OK 3 345910
Read More…

Posted by: jpatiani | April 14, 2008

XP Windows is not genuine

Have you ever seen your windows pop-up this image pirate. Well that would be a shocking notification.

You can use link below to solve the problem:

http://www.magicaljellybean.com/keyfinder.shtml

If this not help, well may be you should just reformat your computer and don’t forget use genuine copy of windows :p

Older Posts »

Categories