$ ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
$ gem -v
2.4.8
$ asciidoctor -v
Asciidoctor 1.5.3 [http://asciidoctor.org]
Runtime Environment (ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)
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
module Jekyll | |
class HierarchialTag | |
def self.decompose_path(path) | |
path.split('/').take_while{|frag| | |
# 潜在的な危険性のある文字列を発見したら、そのパスについては | |
# 危険な文字列以降を捨てる。 | |
# (たとえば'a/b/../c'であれば'a/b'までが使われる)。 | |
# 空文字列でない | |
!frag.empty? && | |
# '..'でない |
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
[Match] | |
Name=host0 | |
[Network] | |
#IPForward=yes | |
DNS=8.8.8.8 | |
Address=172.16.0.2/24 | |
Gateway=172.16.0.1 | |
[Address] |
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
ファイル置いてく。あと解説 | |
startmine.sh, minebackup.sh, backup_install.sh は/home/no961/mc/ に置く。 | |
startmine.sh: | |
これを使ってマイクラ鯖プロセスを起動する。Ctrl+Cで終了。 | |
起動時にramdiskを4GiB確保(実際は、使用される分だけメモリが動的に確保され、その最大が4GiB)。 | |
なお、この容量は変更可能。スクリプト見ればわかる。 | |
また、正常終了/強制終了に関わらず、スクリプト終了の際にデータをHDD側に同期し、ramdiskを開放。 | |
ramdisk確保の際にroot権限が必要なため、パスワードを求められるが、マイクラ鯖自体は特権を用いずに起動される。 | |
また、実行ファイル(jarファイル)自体もramdiskにコピーされ、そちらの方のが起動される。 |