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
SOURCE=http://www.efgh.com/software/rijndael.txt | |
DEFAULT: encrypt decrypt | |
clean: | |
rm -f encrypt decrypt rijndael.c rijndael.h rijndael.txt encrypt.c decrypt.c | |
encrypt: encrypt.c rijndael.c rijndael.h | |
decrypt: decrypt.c rijndael.c rijndael.h | |
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
library(methods) | |
# bitwise operation | |
Bit32 <- setRefClass("bit32", | |
methods = list( | |
rotate = function(a,s) { | |
ior(shift(a,s),shift(a,-(32-s))) | |
}, | |
shift = function(a,shift) { | |
if(class(a) != "uint32") a <- UInt32$new(a) |
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
curl -d"q=select * from html where url='http://d.hatena.ne.jp/mamoruk/archive?word=$(($RANDOM % 1550))' and xpath='//li[contains(concat(\" \",@class,\" \"),\" archive-section \")]/a' limit 1 offset $(($RANDOM % 50))" http://query.yahooapis.com/v1/public/yql |
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
cat job | xargs -L1 kindlenap.pl -o ./ | |
# kindlenap get from motemen/Kindlenap | |
for i in *.html | |
do | |
sed -i"" -e "s/<body>/<body><h1>${i%.*}<\/h1>/" $i | |
sed -i"" -e "s/<\/body>/<mbp:pagebreake \/><\/body>/" $i | |
done | |
kindlegen matz-talks-the-ruby-book.opf |
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
library(ggplot2) | |
# inline でのプロット 省略の波は Keynote のテキストをはっつけた | |
inline <- data.frame(x=c("C", "RCpp", "Pure R"), y=c(0.219, 0.242, 27.969)) | |
ggplot(inline, aes(x=x, y=y)) | |
+ geom_bar(aes(fill=x)) # x ごとに色づけ | |
+ coord_cartesian(ylim=c(0, 0.5)) # y 軸を制限 (はみでる barplot は scale_y_continuous で制限はできない) | |
+ scale_y_continuous(name="elapsed", | |
breaks=c(0, 0.1, 0.2, 0.3, 0.4, 0.5), # 適当に軸を分割する | |
labels=c(0, 0.1, 0.2, 26, 27, 28)) # フリーダムにラベルを張る |
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/zsh | |
# OSX 2.13 公式バイナリ | |
# GotoBLAS 1.13 | |
wget http://r.research.att.com/benchmarks/R-benchmark-25.R | |
Rscript R-benchmark-25.R > netlib.log | |
#curl http://cms.tacc.utexas.edu/fileadmin/images/GotoBLAS2-1.13_bsd.tar.gz | tar zxf - && cd GotoBLAS2 && make | |
# install yourself |
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
require 'formula' | |
class Cmigemo <Formula | |
url 'http://www.kaoriya.net/dist/var/cmigemo-1.3c.tar.bz2' | |
homepage 'http://www.kaoriya.net/#CMIGEMO' | |
md5 '0b9d2feff4cfdc673cc1947fe54191ed' | |
version '1.3c' | |
depends_on 'nkf' |
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
# {{{ | |
OAuth.R.License <- | |
'Copyright (c) 2010 OZAKI Toru (twittoru) | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |