Shortcut | Description |
---|---|
ranger |
Start Ranger |
Q |
Quit Ranger |
R |
Reload current directory |
? |
Ranger Manpages / Shortcuts |
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: | |
# | |
# Settings.configure do |c| | |
# c.foo = "biz" | |
# c.bar = "boo" | |
# end | |
# Test.config.foo | |
# => "biz" | |
# Test.configured? |
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
web: | |
<<: *app | |
environment: | |
<<: *web_environment | |
PASSENGER_STARTUP_FILE: "spec/internal_test_hyku/config.ru" | |
PASSENGER_ENGINE: "builtin" | |
PASSENGER_APP_TYPE: "rack" | |
PASSENGER_ADDRESS: "0.0.0.0" | |
PASSENGER_PORT: "3000" | |
PASSENGER_FRIENDLY_ERROR_PAGES: "true" |
As configured in my dotfiles.
start new:
tmux
start new with session name:
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
if($(window).scrollTop() + $(window).height() == $(document).height()) { | |
} |
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
var myRevealingModule = (function () { | |
var privateCounter = 0; | |
function privateFunction() { | |
privateCounter++; | |
} | |
function publicFunction() { | |
publicIncrement(); |
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
# 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
options = { | |
to: "recipient@address.com", | |
from: "email@address.org", | |
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 |