Skip to content

Instantly share code, notes, and snippets.

# secure alphanumeric password generation in a bash function
# moved to https://github.com/qrohlf/dotfiles/blob/master/functions/gimmepassword.sh

Show records created in the last 5 hours (requires squeel and activesupport):

Model.where{created_at > 5.hours.ago}.map(&:name)
@qrohlf
qrohlf / pull-request-checkout.sh
Last active August 29, 2015 13:57
Checkout a pull request
#example PR checkout:
git remote add bwhthd [email protected]:bwhthd/hackathon-starter-sinatra.git
git fetch bwhthd
git branch bwhthd-password-reset bwhthd/password_reset
git checkout bwhthd-password-reset

Scout Realtime Install

#0. Install gem on server:

gem install scout_realtime
scout_realtime start

hemingway.qrohlf.com:5555 works now!

### Keybase proof
I hereby claim:
* I am qrohlf on github.
* I am qrohlf (https://keybase.io/qrohlf) on keybase.
* I have a public key whose fingerprint is 41EC FE6D 9FFB 8E10 54BE A50E 5D04 7948 81A1 B64B
To claim this, I am signing this object:
ssh-keygen -R hostname.com
@qrohlf
qrohlf / Climbing Stoke.md
Last active August 29, 2015 14:01
Climbing Stoke

Climbing Stoke

Video Series

Featurettes

@qrohlf
qrohlf / Gemfile
Last active August 29, 2015 14:01
getting started check for webdev
ruby "2.1.1"
source 'https://rubygems.org'
gem 'sinatra'
gem 'sqlite3'
gem 'shotgun'
#!/usr/bin/env ruby
# Read the file into a string
file_contents = File.read('memes.txt')
# Split those lines into an array
lines = file_contents.split("\n")
# You could also do the same thing in one step with File.readlines,
# but note that File.readlines will keep newlines whereas split strips them