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 -e | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $local_fs $remote_fs $network | |
# Required-Stop: $local_fs $remote_fs $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
### END INIT INFO |
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
$TTL 86400 | |
@ IN SOA ns.geta6.net. root.geta6.net. ( | |
2012120702 ; Serial | |
3600 ; Refresh | |
1800 ; Retry | |
604800 ; Expire | |
86400 ; Minimum TTL | |
) |
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
{ | |
"name": "ProxyServer", | |
"version": "0.0.1", | |
"private": true, | |
"scripts": { | |
"start": "NODE_ENV=production forever start -c coffee proxyserver.coffee", | |
"stop": "forever stop proxyserver.coffee" | |
}, | |
"dependencies": { | |
"http-proxy": "*", |
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
# Ex. | |
# -- HTML -- | |
# <article> | |
# <header>snap me</header> | |
# <p>Lorem ipsum...</p> | |
# </article> | |
# <article> | |
# <header>snap me</header> | |
# <p>Lorem ipsum...</p> | |
# </article> |
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
# | |
# Usage: | |
# ($ '#main').smoothsnap snap: 'h3' | |
# or | |
# ($ '#main').smoothsnap snap: $ 'h3' | |
( | |
($) -> |
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 | |
if [ -z $1 ]; then | |
echo 'Usage: mtimefix [dirname:/dir/name/here]' | |
exit 1 | |
fi | |
if [ -d $1 ]; then | |
for DIR in $1/* | |
do |
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 | |
if [ 0 = `ps ax | grep HandBrake | grep -v grep | wc -l` ]; then | |
TARGET=`find /media/var/Movies -type f | grep -vE '*.mp4$' | sort -n | head -n 1` | |
if [ ! -z $TARGET ]; then | |
DEST=`echo $TARGET | sed -e 's/\..*\?$/\.mp4/g'` | |
HandBrakeCLI -i "$TARGET" -o "$DEST" \ | |
-e x264 -r 24 -X 1280 --denoise="weak" -5 -O -m -2 -T \ | |
-E faac -B 128 -R Auto -6 dpl2 \ | |
-x level=31:bframes=0:cabac=0:keyint=250:min-keyint=25:\ |
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
prompt = require 'prompt' | |
unixlib = require 'unixlib' | |
schema = | |
properties: | |
user: | |
message: 'Username' | |
requireed: yes | |
pass: | |
message: '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
# Modules | |
http = require 'http' | |
express = require 'express' | |
connect = | |
flash: require 'connect-flash' | |
session: (require 'connect-mongo') express | |
# Passport |
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
# _人人人人人人人人人人_ | |
# > 圧倒的な分散性能 < | |
#  ̄Y^Y^Y^Y^Y^Y^Y^Y^Y ̄ | |
cluster = require 'cluster' | |
cpunums = (require 'os').cpus().length | |
workers = {} | |
global._ = require 'underscore' |