Skip to content

Instantly share code, notes, and snippets.

View benr75's full-sized avatar
Serenity Now.

Ben Reubenstein benr75

Serenity Now.
View GitHub Profile
tacofumi /
Last active December 15, 2023 16:18
This script rips DVD/Blu-ray using makemkvcon. Use udev to invoke this script to auto-rip when disk is inserted. Some variables such as length of string to trim in order to get the title of movie may vary depending on your environment.
echo $(date)
echo ">>>Disk found"
echo ">>>Setting the title..."
title=$(makemkvcon -r info)
title=`echo "$title" | grep "DRV:0\+"`
adelevie / custom_cell.rb
Created November 17, 2012 18:26
Programmatically customize UITableViewCells in RubyMotion
# code inspired from
class CustomCell < UITableViewCell
attr_accessor :primaryLabel
attr_accessor :secondaryLabel
def createLabels
@primaryLabel = UILabel.alloc.init
erikh /
Created March 31, 2012 07:02 — forked from DAddYE/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
boucher / StripeTutorialPage.html
Created February 6, 2012 07:05
Stripe Tutorial Payment Form
<!DOCTYPE html>
<html lang="en">
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<script type="text/javascript" src=""></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->
<script type="text/javascript" src=""></script>
<script type="text/javascript">
// this identifies your website in the createToken call below
cookrn / app.js
Created December 26, 2011 20:18
Push to Resque Queue from Node
require( './boot' );
var DbItem = require( './db_item' )
, item = new DbItem( '123456abcdefg' );
item.queue( function( error , response ){
console.log( 'Response: ' + response );
} );
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')