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) |
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 'sinatra' | |
class Rack::Handler::WEBrick | |
class << self | |
alias_method :run_original, :run | |
end | |
def self.run(app, options={}) | |
options[:DoNotReverseLookup] = true | |
run_original(app, options) | |
end |
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
# This file is used by Rack-based servers to start the application. | |
class SaveOriginalHttpMethod | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
env['rack.methodoverride.original_method'] = env['REQUEST_METHOD'] | |
@app.call(env) |
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 'date' | |
logs = {} | |
hash = nil | |
`git log`.each_line do |line| | |
if line =~ /^commit (\w+)/ | |
hash = $1 | |
end |
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
[ | |
{ "keys": ["ctrl+tab"], "command": "next_view" }, | |
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }, | |
{ "keys": ["ctrl+shift+r"], "command": "refresh_folder_list" } | |
] |
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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"draw_white_space": "all", | |
"font_face": "Source Code Pro", | |
"font_size": 11, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"theme": "Phoenix Dark.sublime-theme", | |
"phoenix_color_blue": true, | |
"phoenix_highlight_current_tab": true, |
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
ssh-keygen -y -f id_rsa > id_rsa.pub |