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
| # .git/hooks/commit-msg | |
| #!/usr/bin/env ruby | |
| msg_file = ARGV[0] | |
| msg = File.read(msg_file) | |
| unless (/(refs|fixes) \#(\d+)/).match(msg) | |
| puts "Your message is not formatted correctly (missing refs #XXX or fixes #XXX)" | |
| 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
| find `perl -e 'print "@INC"'` -name '*.pm' -print |
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 | |
| APP_PATH=/path/to/your_app | |
| function main() { | |
| date=$(date +%Y%m%d_%H%M%S) | |
| mkdir -p $date | |
| trap signalExit 2 | |
| repo | |
| vmstat -n 1 | perl -MPOSIX -pe 'BEGIN{$|=1} print strftime q{%Y/%m/%d %H:%M:%S }, localtime' >> $date/vmstat.txt | |
| } |
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 'rubygems' | |
| require 'memcache_do' | |
| class MemcacheStats | |
| def initialize(host='localhost', port='11211', display_size=100) | |
| @host = host | |
| @port = port | |
| @display_size = display_size | |
| 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
| class Amida | |
| SEPARATOR = ' ' * 3 | |
| VLINE = '|' | |
| BRANCH_LINE = '-' * 3 | |
| def initialize(number) | |
| @number = number | |
| @height = number * 2 | |
| 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
| #config/initializers/quiet_assets.rb | |
| #http://stackoverflow.com/questions/6312448/how-to-disable-logging-of-asset-pipeline-sprockets-messages-in-rails-3-1 | |
| Rails::Rack::Logger.class_eval do | |
| def call_with_quiet_assets(env) | |
| previous_level = Rails.logger.level | |
| Rails.logger.level = Logger::ERROR if env['PATH_INFO'].index('/assets/') == 0 | |
| call_without_quiet_assets(env).tap do | |
| Rails.logger.level = previous_level | |
| end | |
| 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
| diff my.cnf my.cnf_20120502_061523 | |
| 2,3d1 | |
| < character-set-server = utf8 | |
| < default-storage-engine=InnoDB | |
| 33d30 | |
| < character-set-server = utf8 | |
| 37,48d33 | |
| < [mysqldump] | |
| < character-set-server = utf8 | |
| < quick |
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
| vmstat -n 600 | perl -MPOSIX -pe 'BEGIN{$|=1} print strftime q{%Y/%m/%d %H:%M:%S }, localtime' >> vmstat.txt |
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
| Apple Member Center | |
| iOS Provisioning Portal | |
| provisioningをdownload。 | |
| cf.実機開発までの流れ | |
| 1.端末の認証 Certificates へupload | |
| 2.実機の登録 Device | |
| 3.App IDsの登録 |
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
| i=1; while [ $i -ne 31 ]; do sudo mkdir $i; i=$(( $i + 1 )); done |