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
# Uncrustify 0.60 | |
newlines = auto | |
input_tab_size = 4 | |
output_tab_size = 4 | |
string_escape_char = 92 | |
string_escape_char2 = 0 | |
tok_split_gte = false | |
utf8_bom = ignore | |
utf8_byte = false | |
utf8_force = false |
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 | |
# Warning! | |
# if you DIY a stage package like this, | |
# you must use the Stage3`s /etc/udev/* | |
# or rm /etc/udev/rules.d/70* | |
# Warning! | |
# last edited by likuku on 2012.03.29 | |
DATE=`date +%Y_%m_%d_%H_%M_%S` | |
ARCH=`uname -m` |
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
$ ruby -ropenssl -e "puts OpenSSL::VERSION" | |
$ ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE' |
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
# | |
# $BASE_DIR = case $http_host | |
# when "a.example.com" | |
# "a.example.com" | |
# when "a.b.example.com" | |
# "b.example.com" | |
# end | |
# | |
set $BASE_DIR $http_host; | |
if ($http_host ~* ^([a-zA-Z0-9\-]+)\.([a-zA-Z0-9\-]+\.[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-]+)$) { |
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 | |
set -e | |
fqdn=$(dig -x `/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{print $1}'` +noall +answer | grep PTR | awk '{print $5}') | |
fqdn=${fqdn%.} | |
if [ -z $fqdn ]; then | |
exit 0 | |
fi |
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/bash | |
RD=ramdisk | |
if [ ! -e "/Volumes/$RD" ]; then | |
diskutil erasevolume HFS+ "$RD" `hdiutil attach -nomount ram://16777216` # 8G | |
# ~/Library/Developer/Xcode | |
mkdir -p "/Volumes/$RD/Xcode" |
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
function brainLuck(code, input){ | |
code = code || ''; | |
input = input || ''; | |
var memory = (function () { | |
var storage = [], cursor = 0; | |
return { | |
read: function () { | |
return storage[cursor] || 0; | |
}, | |
write: function (c) { |
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
function interpret(code) { | |
var machine = (function () { | |
var stack = []; | |
return { | |
push: function (v) { | |
stack.push(v); | |
return this; | |
}, | |
pop: function () { |
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
interpret = (code) -> | |
class Machine | |
constructor: -> @stack = [] | |
push: (v) -> @stack.push(v) | |
pop: -> @stack.pop() | |
top: -> @stack[@stack.length - 1] |
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
String.prototype.bytes = function () { | |
var bytes = [], i = 0; | |
while ( true ) { | |
var byte = this.charCodeAt(i); | |
if ( isNaN(byte) ) break; | |
bytes.push(byte); | |
i += 1; | |
} | |
return bytes; | |
} |