Skip to content

Instantly share code, notes, and snippets.

Ryan Boland bolandrm

Block or report user

Report or block bolandrm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bolandrm
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
LINES_OF_CONTEXT = 15
TEXT_TO_SEARCH = "Internal Server Error"
FILE_TO_SEARCH = "log/test.log"
private
@bolandrm
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 <https://github.com/FontCustom/fontcustom>.
# =============================================================================
# -----------------------------------------------------------------------------
# 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, http://code.google.com/p/arduino-tiny/)
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
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)
$(this).closest('form').submit()
@bolandrm
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
bolandrm / .zshrc
Last active Jan 4, 2016
add ./bin to path if present (for spring)
View .zshrc
DEFAULT_PATH=$PATH
# ...
# add ./bin to path for Spring (rails)
add_bin_to_path_if_necessary() {
if [[ -d ./bin ]]; then
export PATH=./bin:$DEFAULT_PATH
else
export PATH=$DEFAULT_PATH
@bolandrm
bolandrm / soundcloud.js.coffee
Last active Jan 2, 2016
uploading files to soundcloud with ajax
View soundcloud.js.coffee
UPLOAD_ENDPOINT = 'https://api.soundcloud.com/tracks'
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]', file.name
You can’t perform that action at this time.