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
require 'rack-server-pages' | |
require 'tilt' | |
run Rack::ServerPages.new { |config| | |
config.before do | |
layout('public/_layout.html') | |
end | |
} |
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
class Hoge | |
def foo | |
puts 'foo';end | |
def baz | |
if true | |
puts 'baz' | |
else | |
raise 'baz';end;end;end |
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 | |
### BEGIN INIT INFO | |
# Provides: bluepill | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: bluepill daemon, providing process monitoring | |
# Description: bluepill is a monitoring tool. More info at http://github.com/arya/bluepill. |
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
Bluepill.application("system", :log_file => '/var/log/bluepill/system.log') do |app| | |
app.process('nscd') do |process| | |
process.pid_file = '/var/run/nscd/nscd.pid' | |
process.start_command = '/etc/init.d/nscd start' | |
process.stop_command = '/etc/init.d/nscd stop' | |
process.restart_command = '/etc/init.d/nscd restart' | |
process.checks :mem_usage, :every => 10.minutes, :below => 100.megabytes, :times => [3,5] | |
end | |
end |
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
Powder | Powify | |
[Server Commands] | |
Install pow server ( curl get.pow.cx | sh ) | |
powder install | powify server install | |
Reinstall pow server | |
- | powify server reinstall |
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
(def col-types {clojure.lang.PersistentHashSet :map clojure.lang.PersistentList :list clojure.lang.PersistentVector :vector}) | |
(defn collection-type [col] (col-types (class col))) |
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
source ~/.vim/config/vundle.vim | |
" vim | |
source ~/.vim/config/basic.vim | |
source ~/.vim/config/keymap.vim | |
source ~/.vim/config/omnifunc.vim | |
" bundles | |
source ~/.vim/config/skk.vim | |
source ~/.vim/config/rails.vim | |
source ~/.vim/config/unite.vim | |
source ~/.vim/config/neocomplcache.vim |
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
escape ^Tt | |
defbce on | |
vbell off | |
termcapinfo xterm* ti@:te@ | |
startup_message off | |
defhstatus ^En:^Et | |
maptimeout 0 | |
autodetach on | |
altscreen on | |
defscrollback 10000 |
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
SB_ACCOUNT = ['USERNAME', 'PASSWORD'] | |
GM_ACCOUNT = ['USERNAME', 'PASSWORD'] | |
BOXCAR_ADDR = "123456.123456@push.boxcar.io" | |
sb.select 'INBOX' | |
imap_each(sb, %w(UNDELETED)) do |mail, m| | |
Net::SMTP.start('127.0.0.1', 25) {|smtp| smtp.send_mail mail.attr['BODY[HEADER]'], m[:from], BOXCAR_ADDR} | |
gm.append 'INBOX', m[:src], nil, m[:date] | |
sb.store mail.seqno, '+FLAGS', [:Deleted] | |
end |
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
# /etc/init.d/dropbox | |
### BEGIN INIT INFO | |
# Provides: dropbox | |
# Required-Start: $network $syslog $remote_fs | |
# Required-Stop: $network $syslog $remote_fs | |
# Should-Start: $named $time | |
# Should-Stop: $named $time | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start and stop the dropbox daemon for debian/ubuntu |