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() { | |
| var requestAnimationFrame = (function() { | |
| return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback, element) { | |
| return window.setTimeout(function() { | |
| return callback(); | |
| }, 1000 / 60); | |
| }; | |
| })(); | |
| var i=0; |
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
| # -*- coding: utf-8 -*- | |
| require 'open-uri' | |
| require 'nokogiri' | |
| require 'haml' | |
| engine = Haml::Engine.new(DATA.read, { | |
| :escape_html => true, | |
| :escape_attrs => true | |
| }) |
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 'open-uri' | |
| open("#{ARGV.first}/build").read | |
| warn 'build scheduled' |
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 | |
| # -*- coding: utf-8 -*- | |
| # Jenkinsにブランチを登録するスクリプト | |
| # | |
| # 現在のブランチを追加 | |
| # jenkins_register_branch http://jenkins.example.com/job/Project1 | |
| # 現在のブランチにstagingブランチを追加 | |
| # jenkins_register_branch http://jenkins.example.com/job/Project1 staging |
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
| echo 'Hello, World!' |
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 | |
| emacsclient -e "(magit-status \"./$(git rev-parse --show-cdup)\")" & | |
| osascript -e 'tell application "Emacs" to activate' |
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
| # perl plot_use_graph.pl ~/Plack/lib/**/**.pm | |
| package Parser::Package { | |
| use Class::Accessor::Lite( | |
| new => 1, | |
| ro => [ qw (name includes) ], | |
| ); | |
| } | |
| package Parser { |
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
| require 'wav-file' | |
| def cut | |
| f = open("input.wav") | |
| format = WavFile::readFormat(f) | |
| dataChunk = WavFile::readDataChunk(f) | |
| f.close | |
| bit = 's*' if format.bitPerSample == 16 # int16_t | |
| bit = 'c*' if format.bitPerSample == 8 # signed char |
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
| # -*- coding: utf-8 -*- | |
| queue = ['マークザッカーバーグ'] | |
| chars = queue.first.split(//) | |
| for i in 0...chars.length-1 | |
| for j in 0...chars.length-1-i | |
| chars[j+1],chars[j]=chars[j],chars[j+1] if chars[j] > chars[j+1] | |
| now = chars.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
| # nginx -p . -c server.conf | |
| error_log /dev/stderr debug; | |
| daemon off; | |
| events { | |
| worker_connections 48; | |
| } | |
| http { |