This file contains 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 | |
export u_nyah_count=${u_nyah_count:-"1"} | |
u_nyah_prompt() | |
{ | |
pstr[1]='(」・ω・)」うー! ' | |
pstr[2]='(/・ω・)/にゃー!' | |
pstr[3]='(」・ω・)」うー! ' | |
pstr[4]='(/・ω・)/にゃー!' |
This file contains 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/bash | |
# 動作中のLinuxシステムの/が含まれるパーティションのバックアップ。/data1/はシステムとは別のパーティション(可能なら別の物理メディア)にあるべき。 | |
mnt_root="/mnt/root" | |
hostname="`hostname`" | |
get_mnt_backup() { | |
echo "/data1/backup/${1}/root" | |
} |
This file contains 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
These files are combinators (functions) with SKI combinator for infinite lists, descriptions which shows how to make them, and useful combinators. | |
Now there are only files about infinite combinators and related memos. | |
However, these memos will NOT be UPDATED (even if some data is wrong), so you should see new version ( http://gist.github.com/3888085 ) if you would like to use combinators written in these files. | |
ここには無限リスト(ストリームとも?)に関するコンビネータ、あるいはその作り方のメモ、それらの作業に便利な汎用的なコンビネータを置いてあります。 | |
しかし有限リストを実装する方法を見つけたので、新しいgist ( http://gist.github.com/3888085 ) に移行します。 | |
何故ここを残しておくかというと、無限リストと有限リストで名前が被るコンビネータが多いからです(mapとかfilterとか諸々)。 | |
たとえこちらに間違いがあっても、もう基本的には修正しない(新しいものを追加する可能性はあるが)ので、基本的に新しいバージョンの方を参照してください。 | |
あと、上の英語になんか変なのがあったら、誰か指摘してくれると嬉しいです。俺の母国語は日本語なんで… |
This file contains 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
/* | |
* Description: Motor driver for class 3400's exterior of | |
Kuniko-sai on 2012/09/08(Sat) - 2012/09/09(Sun) | |
* Last modified: 2012/09/03 | |
*/ | |
//#define DEBUG | |
//#define DEBUG_SERIAL | |
/******************************************************************/ |
This file contains 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 | |
CURRENT_IP_FILE=/opt/nu11p0_6477/ddns/CRT_IP.dat | |
# seconds | |
# 7 days = 604800 seconds | |
FORCE_UPDATE=604800 | |
# set your username and password | |
USER="user" | |
PASSWORD="password" |
This file contains 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
# <compose> (<foldr> <cons>(<cons> <256> <256>)) <arg2list> | |
S(K( | |
# <foldr> | |
SII(S(K(S(K(S(S(KS)(S(K(S(S(K(S(SI(K(KI)))(KK)))(S(SI(KK))(KK)))))K))))))(S(K(S(S(KS)(S(K(S(KS)))(S(KK)(S(S(KS)K)(K(S(SI(KK))(K(KI))))))))))(S(K(S(K(S(K(S(S(KS)K)(K(SI(K(KI))))))))))(SII)))) | |
# <cons> | |
(S(S(K(S(KS)K))(S(KS)(S(K(SI))K)))(KK)) | |
# <cons> <256> <256> = K<256> | |
(K(SII(SII(S(S(KS)K)I)))) | |
)) | |
# <arg2list> |
This file contains 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
ここは、俺がこつこつ貯めたSKIコンビネータのいろいろなものを保管しておくための場所です。 | |
無限リスト用のコンビネータは https://gist.github.com/3369073 に(たぶん解説といっしょに)置いてあります。 | |
こちらには、無限リスト用以外のコンビネータを置いておきます。 | |
ちょっとHaskell的な記法で解説すると、Lazy Kでは普通のやり方では無限リストしか表現できません。 | |
たとえばLazy Kインタプリタの入力では、終端に256を使うことになっていますが、任意の数値やコンビネータを含むリストではこの手法は使えません。 | |
そこで、各要素にメタデータ(リスト終端かどうか、Bool)を付加することにしました。 | |
通常は | |
[a] | |
[a, b, c, d, ...] <- 終われない |
This file contains 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
# for gnumake | |
# ( | |
TARGET_DRV = $(OUTDIR)/sxheme | |
TARGET_LIB = $(OUTDIR)/sxheme.a | |
#EXTS := extlib | |
# c++ source files |
This file contains 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
--- orig/apache2 2012-11-11 12:46:14.566069898 +0900 | |
+++ /etc/init.d/apache2 2012-11-11 13:01:16.976170759 +0900 | |
@@ -50,6 +50,15 @@ | |
return 1 | |
fi | |
+ # Create mutex directory for mod_ssl. | |
+ # Portage makes the directory in tmpfs at once, so it disappears after reboot. | |
+ # For details, see http://forums.gentoo.org/viewtopic-t-939604-start-0.html | |
+ MODSSL_MUTEX_DIR="$(sed -e '/^Mutex/!d;s!^Mutex *file:\(/[^ ]*\) *ssl-cache *$!\1!' /etc/apache2/modules.d/40_mod_ssl.conf)" |
This file contains 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
skkにて、略称や複数の読み/表記がある言葉を簡単に変換できるような辞書を作成するためのユーティリティ。 | |
skk辞書形式かcdb形式(あるいは両方)で出力できます。 | |
「[」や「/」など、skk辞書にて特殊な意味をもつ文字を含む文字列には対応していないので悪しからず。 | |
外部でawk、nkf、tee、skkdic-p2cdb(multiskkservと一緒に配布されている)が必要です。 | |
もしskkdic-p2cdbが無くても、skk辞書形式で出力できるのでmultiskkserv以外でも利用できます。 | |
なお、skk辞書形式ではEUC-JPで出力され、ソートや重複の消去、不正なエントリの削除等は一切ないので、 | |
必要なら別のツールで加工してください。 | |
入力ファイルについて: | |
「|」で変換先と変換元を区切ります。 |
OlderNewer