Ctrl+KB | toggle side bar |
Ctrl+Shift+P | command palette |
Ctrl+` | python console |
Ctrl+N | new file |
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
# FactoryGirl3ForYouAndMe | |
# The new syntax: http://robots.thoughtbot.com/post/19412394597/factory-girl-hits-3-0 | |
# | |
# Where to learn sed? | |
# http://www.grymoire.com/Unix/Sed.html#uh-6 | |
# http://www.markhneedham.com/blog/2011/01/11/sed-across-multiple-files/ | |
# | |
# What needs to change? | |
find . -type f -name "*.rb" -print0 | xargs -0 grep "Factory.create" | |
find . -type f -name "*.rb" -print0 | xargs -0 grep "Factory.build" |
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
# -*- coding: utf-8 -*- | |
# DBからデータを取り出してYAMLにする。生成したYAMLはtmp/fixturesに保存される | |
namespace :db do | |
namespace :fixtures do | |
desc "Extract database data to tmp/fixtures directory." | |
task :extract => :environment do | |
fixtures_dir = "#{Rails.root}/tmp/fixtures/" | |
skip_tables = ["schema_info", "schema_migrations", "sessions"] | |
ActiveRecord::Base.establish_connection | |
FileUtils.mkdir_p(fixtures_dir) |
To get a private GitHub repo to work on Heroku, you can leverage the netrc buildpack in conjunction with the Heroku Ruby buildpack.
When setting up the Gemfile
, make sure to use the https GitHub URL. This mechanism does not work with git+ssh.
gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"