Skip to content

Instantly share code, notes, and snippets.


Ryan Boland bolandrm

View GitHub Profile
bolandrm / feature_error_progress_formatter.rb
Created Jun 4, 2015
output errors from logs for feature specs
View feature_error_progress_formatter.rb
# spec/formatters/feature_error_progress_formatter.rb
require 'rspec/core/formatters/progress_formatter.rb'
class FeatureErrorProgressFormatter < RSpec::Core::Formatters::ProgressFormatter
TEXT_TO_SEARCH = "Internal Server Error"
FILE_TO_SEARCH = "log/test.log"
bolandrm / fontcustom.yml
Created Mar 11, 2015
Font Custom config file
View fontcustom.yml
# =============================================================================
# Font Custom Configuration
# This file should live in the directory where you run `fontcustom compile`.
# For more info, visit <>.
# =============================================================================
# -----------------------------------------------------------------------------
# Project Info
# -----------------------------------------------------------------------------
View AVR Sleep
Simple demonstrations of putting AVR microcontrollers to sleep in power-down mode,
which results in minimum current. Coded with Arduino IDE version 1.0.4 (and with
the Arduino-Tiny core for the ATtiny MCUs,
For ATmega328P, ~0.1µA.
For ATtinyX5 revisions that implement software BOD disable, ~0.1µA,
for ATtinyX5 revisions that don't, ~20µA.
bolandrm / gist:9620473
Created Mar 18, 2014
listen for filepicker change event
View gist:9620473
$ ->
$('.filepicker-input').change (e, data) ->
url = e.originalEvent.fpfile.url
$('.js-filepicker-preview').attr('src', url)
bolandrm / .vimrc
Last active Jan 4, 2016
Convert "This is a Description" => this_is_description
View .vimrc
" <Leader>u will convert "I am following User1, User2, and User3" => i_am_following_user1_user2_and_user3
nnoremap <Leader>u Vi" :<C-w>%s/\%V,*\s/_/g<CR> :normal ds" guaW<CR>
bolandrm / .zshrc
Last active Jan 4, 2016
add ./bin to path if present (for spring)
View .zshrc
# ...
# add ./bin to path for Spring (rails)
add_bin_to_path_if_necessary() {
if [[ -d ./bin ]]; then
export PATH=./bin:$DEFAULT_PATH
bolandrm /
Last active Jan 2, 2016
uploading files to soundcloud with ajax
access_token = $('[data-soundcloud-upload]').data('soundcloud-upload')
$('#soundcloud-upload').change () ->
data = new FormData()
field = $('#soundcloud-upload')[0]
$.each field.files, (i, file) ->
data.append 'track[asset_data]', file
data.append 'track[title]',