- findしたものをARにどうやって詰めるのか
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
def prefix(depth=1) | |
s = ' | ' | |
s * depth | |
end | |
def included_modules(klass, hash) | |
modules = Object.const_get(klass).included_modules | |
modules.delete(Kernel) | |
if modules | |
modules.map do |c| |
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
$ gem install therubyracer rbenv:2.2.4 | |
Fetching: libv8-3.16.14.13.gem (100%) | |
Building native extensions. This could take a while... | |
ERROR: Error installing therubyracer: | |
ERROR: Failed to build gem native extension. | |
/Users/takuyan/.rbenv/versions/2.2.4/bin/ruby -r ./siteconf20160324-16905-11t0grf.rb extconf.rb | |
creating Makefile | |
Compiling v8 for x64 | |
Using python 2.7.8 |
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
$ r s | |
dyld: lazy symbol binding failed: Symbol not found: _rb_data_object_alloc | |
Referenced from: /Users/takuyan/dev/github/scrum/vendor/bundle/gems/nokogiri-1.6.6.2/lib/nokogiri/nokogiri.bundle | |
Expected in: flat namespace | |
dyld: Symbol not found: _rb_data_object_alloc | |
Referenced from: /Users/takuyan/dev/github/scrum/vendor/bundle/gems/nokogiri-1.6.6.2/lib/nokogiri/nokogiri.bundle | |
Expected in: flat namespace | |
[1] 30819 trace trap rails s |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
( 5/60): |vimshell| Error | |
/Users/takuyan/.vim/bundle/vimshell | |
/usr/local/Cellar/git/2.1.2/libexec/git-core/git-pull: line 11: git-sh-setup: No such file or directory | |
(37/60): |unite.vim| Error | |
/Users/takuyan/.vim/bundle/unite.vim | |
/usr/local/Cellar/git/2.1.2/libexec/git-core/git-pull: line 11: git-sh-setup: No such file or directory |
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 https://github.com/ichord/Caret.js | |
$target = $('#post_body') | |
insertText = "Hello World" | |
text = $target.val() | |
position = $target.caret('pos') | |
newText = text.substring(0, position) + insertText + text.substring(position) | |
$target.val(newText) |
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
{ | |
"app/serializers/*_serializer.rb": { | |
"command": "serializer", | |
"related": "app/model/*.rb", | |
"alternate": "spec/serializers/%s_spec.rb" | |
}, | |
"app/assets/javascripts/models/*.js.coffee": { | |
"command": "jmodel", | |
"alternate": "spec/javascripts/models/%s_spec.js.coffee", | |
"template": "class @AppName.Models.%S extends Backbone.Model" |
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
group :development do | |
# ... | |
gem 'capistrano' | |
gem 'capistrano-rails' | |
gem 'capistrano-rbenv' | |
gem 'capistrano-bundler' | |
# ... | |
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
#= require jquery | |
#= require jquery.turbolinks | |
#= require turbolinks | |
#= require_self | |
returnAlert = -> | |
$(document).on 'page:before-change', -> | |
url = document.location.href | |
if url.match('(new|edit)$') | |
confirm 'Are you sure?' |
NewerOlder