- デザインパターンを知るキッカケになりそう
- デザインパターンは知識的に理解しているつもりだが、実践できていない
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
$ ruby 01.rb | |
user system total real | |
0.880000 0.000000 0.880000 ( 0.884170) | |
0.880000 0.000000 0.880000 ( 0.888569) |
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
2 [02/Sep/2016:13:38:35 | |
1 [02/Sep/2016:13:38:36 | |
1 [02/Sep/2016:13:38:37 | |
1 [02/Sep/2016:13:38:38 | |
8 [02/Sep/2016:13:38:49 | |
11 [02/Sep/2016:13:38:50 | |
11 [02/Sep/2016:13:38:51 | |
9 [02/Sep/2016:13:38:52 | |
10 [02/Sep/2016:13:38:53 | |
11 [02/Sep/2016:13:38:54 |
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/sh | |
if [ $# -ne 1 ]; then | |
echo "usage: $ yomikata git" | |
exit 1 | |
fi | |
curl http://yomikata.org/word/$1 2>/dev/null| egrep -o "「([^「]+)」です" |
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
# vim: set ft=ruby | |
module Autotest::Growl | |
def self.growl title, msg, pri=0, sticky="" | |
msg += " at #{Time.now.strftime('%Y-%m-%d %H:%M:%S')}" | |
system "growlnotify -n autotest -p #{pri} -m #{msg.inspect} #{title} #{sticky}" | |
end | |
Autotest.add_hook :ran_command do |at| | |
output = at.results.last | |
output = output.gsub!(/\e\[\d+m/,'').gsub!(/\n/,'') |
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
let PLUGIN_INFO = xml` | |
<VimperatorPlugin> | |
<name>fms_switcher</name> | |
<description>This script allows you to switch FireMobileSimulator status with Vimp CLI.</description> | |
<version>1.0.1</version> | |
<author>zentooo</author> | |
<license>Creative Commons</license> | |
<detail><![CDATA[ | |
== Subject == | |
This script allows you to switch FireMobileSimulator status from Vimperator CLI. |
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
ruby -r uri -ne 'puts URI.unescape $_.chomp' |
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 File.expand_path('../boot', __FILE__) | |
require 'rails/all' | |
# If you have a Gemfile, require the gems listed there, including any gems | |
# you've limited to :test, :development, or :production. | |
Bundler.require(:default, Rails.env) if defined?(Bundler) | |
module AppLibTest | |
class Application < Rails::Application |
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
function test(){ // 関数 | |
console.log("test"); | |
} | |
function Animal(type, voice){ // コンストラクタ | |
this.type = type; | |
this.bark = function(){ // メソッド | |
console.log(voice); | |
}; | |
} |
NewerOlder