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
| # phantomjs auto_shindanmaker.coffee | |
| selectRandom = (list) -> | |
| list[Math.floor(Math.random() * list.length)] | |
| phantom.state = 0 | |
| page = new WebPage() | |
| page.open 'http://shindanmaker.com/c/list', (status) -> | |
| try | |
| phantom.state++ |
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
| $ -> | |
| $('a').each -> | |
| if this.href == location.href | |
| $(this).css | |
| 'font-weight': 'bold' | |
| 'font-size' : '120%' |
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 'pdf-reader' # gem install pdf-reader --prerelease | |
| puts PDF::Reader.new(ARGV.first).page_count |
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 | |
| puts 0 | |
| source = open($0).read | |
| open($0, "w").write source.sub(/puts (\d+)/) { | |
| "puts #{$1.to_i+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
| #! /usr/bin/env ruby | |
| puts ARGF.read.split(//).sort.join('') |
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
| import java.util.Scanner; | |
| import java.awt.AWTException; | |
| import java.awt.GraphicsEnvironment; | |
| import java.awt.Rectangle; | |
| import java.awt.Robot; | |
| public final class MouseJump | |
| { | |
| public static void main(String[] args) throws AWTException | |
| { |
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
| ;; suggest-restart.el | |
| ;; Emacsのメモリ使用量をチェックして,上限を越えていたら再起動をおすすめする | |
| ;; デフォルト設定では閾値は500MBを越えているかを,600秒ごとにチェック | |
| ;; 変えたければsuggest-restart:threshold,suggest-restart:intervalを変える | |
| ;; (suggest-restart t) で開始 | |
| (require 'deferred) | |
| (defvar suggest-restart:threshold 500000) |
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
| ;; quickrun.elをcompileで動かすやつ | |
| (defun my-quickrun () | |
| "Run commands quickly for current buffer" | |
| (interactive) | |
| (quickrun-common (point-min) (point-max))) | |
| (defun my-quickrun-common (start end) | |
| (let* ((src (file-name-nondirectory (buffer-file-name))) | |
| (lang (quickrun/decide-file-type src)) |
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 'base64' | |
| require 'mime/types' | |
| require 'httpclient' | |
| unless ARGV.length > 0 | |
| warn "Usage: #{$0} file..." | |
| exit 1 | |
| end |
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
| html { | |
| font-family: "Monaco"; | |
| background-color: #fdf6e3; | |
| color: #657b83; | |
| word-wrap: break-word; | |
| margin: 0; | |
| padding: 3px 4px 10px 4px; | |
| } | |
| body { |