Skip to content

Instantly share code, notes, and snippets.

use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
$VERSION = '0.1';
%IRSSI = (
authors => 'kshimo69',
contact => 'kshimo69@gmail.com',
name => 'growl_irssi',
description => 'send local growl with growlnotify',
#!/usr/bin/env python
# coding: utf-8
"""Convert howm formated document to ChangeLog formated document.
"""
import re
import sys
import os
import glob
#!/bin/sh
euc2utf() {
for fname in $*
do
if [ -d $fname ]; then
echo "directory: $fname"
(cd $fname; euc2utf *;)
elif [ -f $fname ]; then
echo "file: $fname"
#!/bin/sh
if [ -z "$1" ];then
echo "usage: `basename $0` keywaord"
exit 1
fi
find . -type f -print0 | xargs -0 -e grep -n -e $1
#!/bin/bash
perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \
'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC'
#!/bin/sh
if [ $# != 1 ]; then
echo "usage: `basename $0` DriverName"
echo " ex.) `basename $0` hfcldd"
exit 1
fi
for i in modinfo modules.cgz modules.dep pcitable rhdd; do
if [ ! -f $i ]; then
#!/bin/sh
FDIMAGE="tool.img"
if [ $# -lt 1 ]; then
echo "usage: `basename $0` FileName [FileName ...]"
echo " ex.) `basename $0` ks.cfg auto.cfg"
exit 1
fi
#!/usr/bin/env python
# vim: fileencoding=utf8
import socket
import random
IPMSG_VERSION = 0x0001
IPMSG_SENDMSG = 0x00000020
LOCAL_USER = u"自動通知".encode('shift-jis')
#!/usr/bin/env python2.6
#-*- coding:utf-8 -*-
# http://d.hatena.ne.jp/yogit/20091206/1260092233
import sys
import urllib
import urllib2
import json
def translate(from_lang='en', to_lang='ja', word=''):
global epoc, hour, min, sec
probe begin {
print("hello world\n");
printf("epoctime:%d\n", gettimeofday_s());
epoc = gettimeofday_s();
hour = (epoc % (24 * 60 * 60)) / (60 * 60) + 9;
min = (epoc % (60 * 60)) / 60;
sec = epoc % 60;
printf("%d:%d:%d\n", hour, min, sec);
exit();