$ rails g model User
belongs_to
has_one
# -*- coding: utf-8 -*- | |
require "tempfile" | |
desc "scaffoldで生成されたコントローラーからrespond_toブロックを消す" | |
namespace :my do | |
task :rm_respond_to do | |
Dir::glob("app/controllers/*_*.rb") do |ctrl| | |
if !(File::basename(ctrl) =~ /application/) | |
temp = Tempfile::new("tmp",Dir::pwd) | |
open(ctrl) do |f| | |
text = f.read |
require 'oauth' | |
require 'json' | |
require 'cgi' | |
class Tumblr4r | |
def initialize(access_token) | |
@access_token = access_token | |
end | |
def api_key |
# -*- coding: utf-8 -*- | |
# CSA形式の棋譜を表すクラス | |
class CsaRecord | |
Sente = true | |
Gote = false | |
attr_accessor :file | |
def initialize( *args ) | |
option = args.pop | |
case option |
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
Generate ctags with `rake ctags` | |
Run snipper.rb | |
Put resulting ruby.snippets file where your snippet plugin can pick it up. (I'm using snipmate) |
Man-bookmark-jump | |
abbrev-edit-save-buffer | |
abbrev-edit-save-to-file | |
abbrev-table-empty-p | |
allout-auto-activation-helper | |
allout-setup | |
allout-widgets-mode | |
allout-widgets-setup | |
balance-windows-1 | |
balance-windows-2 |
$ -> | |
game = new Main() | |
game.start() | |
#共通ライブラリ | |
#行列演算のための関数 | |
##行列の和 | |
addArray = (array1, array2) -> | |
array = [] | |
len = array1.length |