homebrewでインストール
$ brew update| require 'dnsimple' | |
| require 'platform-api' | |
| namespace :staging do | |
| desc "create subdomain DNS record for Heroku review app" | |
| task :publish_dns do | |
| heroku_app_name = ENV['HEROKU_APP_NAME'] | |
| heroku_app_name =~ /.*(pr-\d+)/ | |
| subdomain = $1 |
| package main | |
| import ( | |
| "encoding/json" | |
| "errors" | |
| "flag" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net" |
| Kernel.class_eval do | |
| #FIXME this is terrible | |
| def static(meth) | |
| define_singleton_method(meth) do |*args, &b| | |
| new.send meth, *args, &b | |
| end | |
| meth | |
| end | |
| def abstract(meth) |
※この際、Sassだけcommitを分けると楽 → 不要なファイルやコンフリクトがなければそのままcommitごとmasterに取り込まれるので超ベンリです。
作業中のトピックブランチで git log して必要なcommitのIDをコピー
$ git log
commit一覧が出てくるので、masterに取り込みたい「commit」の右側の文字列をコピー(下記の場合は 88ca4f2b3958748baf9947dcf1fdaebc01616cf6 をコピー)
| load 'deploy' unless defined?(_cset) | |
| _cset :asset_env, "RAILS_GROUPS=assets" | |
| _cset :assets_prefix, "assets" | |
| _cset :assets_role, [:web] | |
| _cset :normalize_asset_timestamps, false | |
| after 'deploy:update_code', 'deploy:assets:precompile' |
#Backbone.jsでUIバインディング
Backbone.js Advent Calendarの14日目です。
Backbone.jsはAngularJSのようなUIバインディングを持たないので自分でバインドしなければなりません。 例えば、テキストボックスの入力内容をモデルに格納して、さらにモデルの内容を別のDOM要素に表示する、 というのはこんな感じかと思います。