This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/perl | |
use strict; | |
use warnings; | |
use utf8; | |
binmode STDIN, ':utf8'; | |
binmode STDOUT, ':utf8'; | |
binmode STDERR, ':utf8'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
class Poem | |
def initialize | |
@text = <<-END.gsub(/^\s+/,'') | |
この支配からの卒業 | |
(尾崎豊) | |
END | |
end | |
def shout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
git clone git://gist.github.com/1300263.git | |
./commondotfiles | |
*/ | |
#! /bin/sh | |
INSTALLDIR=$HOME | |
for FILE in `find $PWD/dotfiles/ -name ".*" | grep -v "bak"` ; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# | |
# Make arbitrary directries, and execute this scripts. | |
# that's all. write your HTML5 Application! | |
# | |
{ | |
cat <<EOF | |
<!DOCTYPE html> | |
<html lang="ja"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env perl | |
=head | |
半角カタカナ→全角カタカナ変換を調べたのでメモ | |
=cut | |
use strict; | |
use warnings; | |
use Encode; | |
use Encode::JP::H2Z; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
#-*- coding:utf-8 -*- | |
import os | |
import hashlib | |
from datetime import * | |
remote_addr = os.environ["REMOTEHOST"] | |
current_time = datetime.now() | |
ct = current_time.strftime("%y%m%d%H%M%S") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Original | |
func substr(s string,pos,length int) string{ | |
bytes:=[]byte(s) | |
l := pos+length | |
if l > len(bytes) { | |
l = len(bytes) | |
} | |
return string(bytes[pos:l]) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in a project directory,,, | |
>> virtualenv venv | |
>> . venv/bin/activate | |
>> pip install ... | |
>> ... | |
>> ... | |
>> pip freeze > requirements.txt | |
in any other project directory,,, | |
>> virtualenv venv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env perl | |
use strict; | |
use warnings; | |
use Encode; | |
use Data::Dumper; | |
use XML::FeedPP; | |
use File::Copy; | |
use File::Spec; | |
use diagnostics; |
OlderNewer