I hereby claim:
- I am lukerandall on github.
- I am lukerandall (https://keybase.io/lukerandall) on keybase.
- I have a public key whose fingerprint is 5276 C4BF 7D84 19B8 81A5 58EB 5663 DCF9 486C 62A4
To claim this, I am signing this object:
| def display_standard_flashes(message = 'There were some problems with your submission:') | |
| if flash[:notice] | |
| flash_to_display, level = flash[:notice], 'notice' | |
| elsif flash[:warning] | |
| flash_to_display, level = flash[:warning], 'warning' | |
| elsif flash[:error] | |
| level = 'error' | |
| if flash[:error].instance_of?( ActiveRecord::Errors) || flash[:error].is_a?( Hash) | |
| flash_to_display = message | |
| flash_to_display << activerecord_error_list(flash[:error]) |
| DVORAK = { | |
| :a => 0, | |
| :b => 4, | |
| :c => 2, | |
| :d => 1, | |
| :e => 0, | |
| :f => 2, | |
| :g => 2, | |
| :h => 0, | |
| :i => 1, |
| namespace :bundler do | |
| desc "Updates gems using bundler" | |
| task :update_gems do | |
| run "cd #{release_path} && bundle install vendor --disable-shared-gems --relock --without test" | |
| end | |
| end | |
| namespace :db do | |
| desc "Symlink database.yml config file" | |
| task :symlink_config do |
| set hidden " allow buffers to be hidden when they have unsaved changes | |
| set visualbell " turn off beeps | |
| set nobackup " don't need backups with git | |
| call pathogen#runtime_append_all_bundles() | |
| let mapleader = "," " map leader key | |
| imap jj <Esc> | |
| " Remap C-(e|y) so that they scroll by 3 lines |
| ;; This buffer is for notes you don't want to save, and for Lisp evaluation. | |
| ;; If you want to create a file, visit that file with C-x C-f, | |
| ;; then enter the text in that file's own buffer. | |
| (load-theme 'twilight-anti-bright) |
| class Doorman | |
| attr_reader :user, :portal, :account | |
| def initialize(user, portal, account) | |
| @user = user | |
| @portal = portal | |
| @account = account | |
| end | |
| def accessible_accounts |
| class Doorman | |
| attr_reader :user, :portal, :account | |
| def initialize(user, portal, account) | |
| @user = user | |
| @portal = portal | |
| @account = account | |
| end | |
| # Returns a collection of accounts scoped to the user's rights of access. |
| alias gap='git add -p' | |
| alias gb='git branch' | |
| alias gc='git commit -v' | |
| alias gca='git commit -a -v' | |
| alias gco="git checkout" | |
| alias gd='git diff' | |
| alias gdc='git diff --cached' | |
| alias gdh='git diff HEAD' | |
| alias gl='git pull' | |
| alias glod='git log --oneline --decorate' |
I hereby claim:
To claim this, I am signing this object:
| require 'time' | |
| start_time = Time.now | |
| readings, streaks, latest_streak = File.open('quacklog.txt').gets.split(', ').collect{|t| Time.parse(t)}, [], 0 | |
| readings.each_with_index do |t, i| | |
| next if i == 0 | |
| if t - readings[i-1] <= 2.0 | |
| latest_streak += 1 | |
| else | |
| streaks << latest_streak if latest_streak >= 3 |