小さいものは、大きい物にない利点がいくつもある。小さいもの同士なら簡単に独特の便利な方法で組み合わせることができる
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
ACTIVE_ATTRIBUTES: 35721 | |
ACTIVE_ATTRIBUTE_MAX_LENGTH: 35722 | |
ACTIVE_TEXTURE: 34016 | |
ACTIVE_UNIFORMS: 35718 | |
ACTIVE_UNIFORM_MAX_LENGTH: 35719 | |
ALIASED_LINE_WIDTH_RANGE: 33902 | |
ALIASED_POINT_SIZE_RANGE: 33901 | |
ALPHA: 6406 | |
ALPHA_BITS: 3413 | |
ALWAYS: 519 |
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
while; do; echo -n $(date); echo -n ' '; ps l --ppid=$(ps alx | grep unicorn | grep master | awk "{ print \$3 }") | awk "{ print \$10}" | grep R | wc -l; sleep 3; done rbenv:syst |
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 'date' | |
# 実際は ActiveSupport の機能をつかう | |
class Date | |
def beginning_of_month | |
self.class.new(self.year, self.month, 1) | |
end | |
end | |
class MonthlyEnumerator < Enumerator |
i-node を使用しているディレクトリを探す
$ find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n
2日前のXMLファイルを削除する
$ find ./ -mtime +2 -name "*.xml" | xargs rm -f
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
#!/usr/bin/env ruby | |
require 'open3' | |
require 'optparse' | |
module RunAndNotify | |
def self.parse!(argv) | |
notifiers = [] | |
opt = OptionParser.new | |
opt.on('--notifier NOTIFIER') {|v| |
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 'spec_helper' | |
require 'forwardable' | |
module EmailDoc | |
def self.doc_path | |
Rails.root.join('doc', 'mail') | |
end | |
def self.documents | |
@documents ||= Documents.new |
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
sed -e 's/https:\/\/gist.github.com\/\([0-9a-z][0-9a-z]*\).git/git@github.com:\1.git/' |
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/bash | |
set -e | |
command_name=`basename $0` | |
function usage() { | |
echo "Usage:" | |
echo " $command_name --username username --org org [OPTIONS]" | |
echo |
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
#!/usr/bin/env ruby | |
# -*- encoding: utf-8 -*- | |
require 'open-uri' | |
require 'json' | |
class String | |
def blue | |
"\e[34m" + self + "\e[m" | |
end |
NewerOlder