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
| #!/usr/bin/env macruby | |
| # | |
| # MacRubyで画面グリッチをフルスクリーン表示する | |
| # | |
| # http://twitter.com/negipo/status/67572370247913473 | |
| # | |
| # ## Usage | |
| # | |
| # ./glitch.rb | |
| # |
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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'eventmachine' | |
| require 'em-http' | |
| # | |
| def subscribe(opts) | |
| listener = EventMachine::HttpRequest.new('http://127.0.0.1/sub/'+ opts[:channel]).get :head => opts[:head] | |
| listener.callback { | |
| # print recieved message, re-subscribe to channel with | |
| # # the last-modified header to avoid duplicate messages |
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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'ffi-rzmq' | |
| REQUEST_RETRIES = 3 | |
| REQUEST_TIMEOUT = 2500 | |
| REQUEST_ENDPOINT = "tcp://127.0.0.1:5555" | |
| module ZMQ | |
| class Poller |
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
| diff --git a/lib/page.rb b/lib/page.rb | |
| index 5c7071f..82e855e 100644 | |
| --- a/lib/page.rb | |
| +++ b/lib/page.rb | |
| @@ -4,8 +4,12 @@ require 'config' | |
| require 'lib' | |
| require 'related' | |
| require 'uploaded' | |
| +require 'fileutils' | |
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
| // ==UserScript== | |
| // @match http://*/* | |
| // ==/UserScript== | |
| function addJQuery(callback) { | |
| var script = document.createElement("script"); | |
| script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"); | |
| script.addEventListener('load', function() { | |
| var script = document.createElement("script"); |
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
| // ==UserScript== | |
| // @match http://*/* | |
| // ==/UserScript== | |
| function addJQuery(callback) { | |
| var script = document.createElement("script"); | |
| script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"); | |
| script.addEventListener('load', function() { | |
| var script = document.createElement("script"); |
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
| #!/usr/bin/env ruby | |
| # | |
| # svnの$Date$っぽくコミットした時に$Date$に編集した時間を入れる | |
| # | |
| # stageされているファイルを探す | |
| files = `git diff --name-only --cached` | |
| # 日付入れる |
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
| # oh-my-zsh! notification plugin | |
| # | |
| # DESCRIPTION | |
| # | |
| # INSTALL | |
| # | |
| # Place this file to $HOME/.oh-my-zsh/plugins/notification/notification.plugin.zsh | |
| # | |
| # USAGE | |
| # |
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 | |
| # | |
| # Init file for qmail. | |
| # | |
| # chkconfig: - 99 02 | |
| # description: qmail. SMTP server | |
| # | |
| # processname: qmail-smtpd | |
| # pidfile: /var/run/qmail |