Taken from Zach Holman's "Git and Github Secrets".
t - quickly jump through files (similar to cmd+T in VI or Text Mate)
w - quickly switch branches
s - search
Taken from Zach Holman's "Git and Github Secrets".
t - quickly jump through files (similar to cmd+T in VI or Text Mate)
w - quickly switch branches
s - search
| # Tokyo Night Storm theme | |
| set -g status-style 'bg=#24283b fg=white' | |
| # Print full session name in the status bar | |
| set -g status-left-length 100 | |
| set -g status-left "#[fg=#73daca]#S #[default]" | |
| # Set the current window to display in a different color | |
| set-option -g window-status-current-style "fg=#bb9af7,bold" |
Qlobe is a fascinating example of quine in Ruby, submitted by a member of the Ruby core team - Yusuke Endoh.
Programs that output changed executable versions of themselves while managing to spin the globe and still remaining executable are cool, right?
To experience its magic, run the following
curl -fSSl https://gist.githubusercontent.com/shime/f0ebe84ca42c33b51d42/raw/5e74315dc6b6fe572f8a457536ad7eb17ad3f1e4/qlobe.rb > qlobe.rb; while true; do ruby qlobe.rb | tee temp.rb; sleep 1; mv -f temp.rb qlobe.rb; done
Having trouble installing the latest stable version of tmux?
I know, official package for your OS/distro is outdated and you just want the newest version of tmux.
Well, this script should save you some time with that.
| <keyboard> | |
| <!-- resize windows with Alt + Direction --> | |
| <keybind key="A-Right"> | |
| <action name="GrowToEdgeEast"/> | |
| </keybind> | |
| <keybind key="A-Left"> | |
| <action name="GrowToEdgeWest"/> | |
| </keybind> | |
| <keybind key="A-Down"> | |
| <action name="GrowToEdgeSouth"/> |
Let's build our own code reloader for Rails, shall we?
Run this inside rails/railties:
$ grep -rn "eager_load_paths" .
You should get the results from Rails::Engine::Configuration and Rails::Engine. As you know, each Rails application is actually a Rails::Engine and Rails::Engine::Configuration is that thing wrapped inside Rails.application.config block.
| namespace :db do | |
| desc 'Clears the database and then seeds it' | |
| task reseed: :environment do | |
| Rake::Task["db:truncate"].invoke | |
| Rake::Task["db:seed"].invoke | |
| end | |
| desc 'Clears the database' | |
| task truncate: :environment do | |
| puts "Truncating database" |