Shortcut | Description |
---|---|
ranger |
Start Ranger |
Q |
Quit Ranger |
R |
Reload current directory |
? |
Ranger Manpages / Shortcuts |
As configured in my dotfiles.
start new:
tmux
start new with session name:
Installing the ruby PG gem requires Postgres to be instaled locally to install the gem, which is annoying and unnecessary if you're building inside of docker.
An error occurred while installing pg (1.2.3), and Bundler cannot continue.
Make sure that `gem install pg -v '1.2.3' --source 'https://rubygems.org/'` succeeds before bundling.
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
// $("a.popup").each(function() { | |
// new PopupWindow($(this)) | |
// }); | |
class PopupWindow { | |
constructor($target){ | |
this.$target = $target | |
if (this.$target.length === 0) { | |
return |
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
options = { | |
to: "[email protected]", | |
from: "[email protected]", | |
subject: "Testing", | |
body: "This is the body" | |
} | |
ActionMailer::Base.mail(options).deliver_now |
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
# Usage: | |
# class YourClass < ApplicationRecord | |
# denormalizable_collection :my_collection | |
# ... | |
# | |
# def self.my_collection_data | |
# self.where(...).limit(5) | |
# end | |
# 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
# Oneliner | |
require 'sidekiq/api'; [Sidekiq::Queue.all.each(&:clear), Sidekiq::ScheduledSet.new.clear, Sidekiq::RetrySet.new.clear, Sidekiq::DeadSet. | |
new.clear]; | |
require 'sidekiq/api'; | |
# 1. Clear retry set | |
Sidekiq::RetrySet.new.clear | |
# 2. Clear scheduled jobs |
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
du -h --max-depth 1 |
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
#app/config/initializers/mailer.rb | |
ActionMailer::Base.smtp_settings = { | |
address: 'smtp.mandrillapp.com', | |
port: 587, | |
user_name: '<account email>', | |
password: '<api key>', | |
authentication: 'login' | |
} | |
ActionMailer::Base.delivery_method = :smtp |