counter

20081128

I just made script that fetch twitter timeline and display to Snarl.

It's only Snarl + Ruby. Snarl is system notification tool that like Growl for Mac OS X. You have to download Snarl from here(Snarl :: Homepage). Also need following ruby libraries.

Script

Usage

You have to change following settings.
  • user_id
  • password
  • proxy_serer
  • proxy port
Command line parameter is ...
  • Num of messages

20081121

Shell script that execute JOBNET on JP1.

Execute JOBNET from termnal.

Usually use java base client in case of excute JOBNET on JP1. So I feel frastration to that hevy weight client. (I think my PC specs not too enough for development usage.) Thats why, I made shell script that execute JP1's JOBNET from telnet terminals. Script is simple. Invoke JOBNET fom ajsentry command.And then wait for a JOBNET. Then parse result and display it.

Script

Script is here.(named 'ajsrun.sh')
#!/bin/sh

JOB_NET=$1

echo "ajsentry -n -w $JOB_NET"
ajsentry -n -w $JOB_NET
echo "ajsshow -l -k -T $JOB_NET"
ajsshow -l -k -T $JOB_NET

Usage

From shell prompt...
ajsrun.sh JOBNET_NAME

Example

Invoke JOBNET '/aaaa/bbbb/JOBNET01'
bash-2.05$ ajsrun.sh /aaaa/bbbb/JOBNET01/
ajsentry -n -w /aaaa/bbbb/JOBNET01/
ajsshow -l -k -T /aaaa/bbbb/JOBNET01/
AJSPATH = /aaaa/bbbb/JOBNET01             net    正常終了         ***          2006/02/14 0:19  2006/02/14  0:20

bash-2.05$

How to parse signed number in COBOL

Conversion table

Here is conversion table.
Digit placehigh digitlow digit
&hx0&hx1&hx2 &hx3&hx4&hx5&hx6&hx7&hx8&hx9
Higher than tenths place digit&h3x0123456789
ones place digit(positive)&h4x@ABCDEFGHI
ones place digit(negative)&h5xPQRSTUVWXY

Converting example

123@+1230
200E-2005
123P-1230
102T-1024

Script that export sequence object from Oracle database

expSeq.sql Usage
sqlplus user/pass @expSeq.sql
Example
bash-2.05$ sqlplus mais/mais @expSeq.sql

SQL*Plus: Release 9.2.0.6.0 - Production on 日 Dec 4 01:19:02 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
に接続されました。
-- シーケンスを削除する
DROP SEQUENCE aaaaSEQ;
DROP SEQUENCE bbbbSEQ;
DROP SEQUENCE ccccSEQ;
(省略)
-- シーケンスを生成する
CREATE SEQUENCE aaaaSEQ START WITH 26857 INCREMENT BY 1 MINVALUE 1 MAXVALUE 9999999 CYCLE CACHE 20;
CREATE SEQUENCE bbbbSEQ START WITH 34343 INCREMENT BY 1 MINVALUE 30000 MAXVALUE 49999 CYCLE CACHE 20;
CREATE SEQUENCE ccccSEQ START WITH 33367 INCREMENT BY 1 MINVALUE 30000 MAXVALUE 49999 CYCLE CACHE 20;
(省略)
quit
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Productionとの接続が切断されました。


20081117

Hack GanttProject for mouse wheel behavior

I love GanttProject. Becouse it is most effecient opensource project management tool for me. But I feel discomfort to behavior of mouse wheel. I ofeten use wheel for scrolling. But, in case of GanttProject, mouse wheel assign to zooming operation. I ofeten missoperation and feel frastrations. That's why I made patch and binary for mouse wheel behavior. You can download binary file form following link. This patch changing.
  • You roll up/down wheel on chart area to scroll up/down.
  • You ctrl + roll up/down wheel on chart area to zoom in/out.

Usage

  1. Download "ganttproject.jar" from a link above.
  2. Place "ganttproject.jar" to your GanttProject installed folder. (GanttProject Installed folder)\plugins\net.sourceforge.ganttproject_2.0.0
  3. Launch GanttProject.
I post patch for your feference.

20081116

How to post to twitter from Launchy

Instruction

  1. Make a few line code with Ruby.
  2. Use Runny plugin.
That's all. Optionally, Get ruby-snarl gem. So you can recieve notify of result from your script. Here is my Ruby code. (Named 'Twitty.rb') This script have two arguments.
  1. User accout.
  2. Password.
  3. Tweet
You should supply your own user name and password to this script. And tweet is text message. Here is setting of Runny plugin. I was named 'twitty' to this command.

Usage

Invoke Launchy by Ctrl+Space etc.(depend on your setting). Then type 'twitty'. And hit TAB. And type your tweet.

Links

Followers

About Me

Tokyo, Japan
http://iddy.jp/profile/snaka/