Skip to content

Instantly share code, notes, and snippets.

View mackermedia's full-sized avatar

Mike Ackerman mackermedia

  • Lincoln, NE
View GitHub Profile
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@nicalpi
nicalpi / facebook_registration.rb
Created September 7, 2011 11:48
Testing Omniauth with Devise, Rspec and Capybara
background do
set_omniauth()
click_link_or_button 'Sign up with Facebook'
end
@alexeckermann
alexeckermann / oauth_mocking.rb
Created September 8, 2011 12:56
OmniAuth testing in RSpec + Capybara
module OauthMocking
def login_with_oauth(provider = :twitter)
visit "/auth/#{provider}"
end
end
@jrochkind
jrochkind / gist:2161449
Created March 22, 2012 18:40
A Capistrano Rails Guide

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

@trcarden
trcarden / gist:3295935
Created August 8, 2012 15:28
Rails 3.2.7 SSL Localhost (no red warnings, no apache config)
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@LBRapid
LBRapid / keypress.rb
Created September 21, 2012 18:03
Simulate keyup event in a request spec with capybara/poltergeist
keypress_script = "var e = $.Event('keyup', { keyCode: 13 }); $('#main-search-input').trigger(e);"
page.driver.execute_script(keypress_script)
@mackermedia
mackermedia / Gemfile
Last active August 4, 2016 19:07
Capybara + JS Testing
group :test do
gem 'capybara'
gem 'poltergeist' # gem 'capybara-webkit'
gem 'database_cleaner'
end
@christofluethi
christofluethi / gist:646ae60d797a46a706a5
Last active January 6, 2026 17:41
Convert m4a to mp3 on OS X command line using ffmpeg
brew update
brew link yasm
brew link x264
brew link lame
brew link xvid
brew install ffmpeg
ffmpeg wiki:
https://trac.ffmpeg.org/wiki/Encode/MP3

##First turntable meeting 5/19/2015

###Overview

  • RySten, David, Nate, Eli
  • Overall goals (similar to generic Pointless spiel)
  • Interested primarily in Elixir and React for this project
    • will keep an eye out for opportunities for any and all tech choices
  • Want to keep scope reasonable (+ bad-ass avatars)

###Next Steps

@viget
viget / rdio_to_spotify.coffee
Last active August 29, 2015 14:21
Hubot Rdio to Spotify Converter
request = require('request')
cheerio = require('cheerio')
artist = ''
album = ''
track = ''
module.exports = (robot) ->
robot.hear /(https?:\/\/(www.)?(rd.?io).+)/i, (msg) ->