gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
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
queue = Sidekiq::Queue.new("default") | |
queue.each do |job| | |
if job.klass == "DailyFrequencyCreatorWorker" | |
DailyFrequencyCreatorWorker.set(queue: 'daily_frequency_creator').perform_async(*job.args) | |
job.delete | |
end | |
end;nil |
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
module AddFrozenStringLiteralComment | |
def add_frozen_string_literal_comment(dist) | |
if File.exist?(dist) && File.extname(dist) == '.rb' | |
File.open(dist, 'r') do |f| | |
body = f.read | |
File.open(dist, 'w') do |new_f| | |
new_f.write("# frozen_string_literal: true\n" + body) | |
end | |
end |
I needed to reinstall my postgres gem after upgrading to OS X Mavericks. I used homebrew to install postgres.
Find the path to your postgres config with
brew info postgres
And look for something like: postgres -D /usr/local/var/postgres # serve that database
Now use the --with-pg-config
option to point to that directory and use gem install
directly instead of bundler for just this one:
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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |