Skip to content

Instantly share code, notes, and snippets.

SteveBenner / load-jQuery.js
Created August 7, 2020 17:35 — forked from takkyuuplayer/load-jQuery.js
use jQuery in Chrome javascript console.
var jq = document.createElement('script');
jq.src = "//";
SteveBenner /
Created July 28, 2017 04:57 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


SteveBenner / _color-palette.slim
Created October 29, 2015 14:32
Slim partial - renders a color palette on your web page to aid in graphic design
/ This is a humble web design tool inspired by the eyedropper functionality in Google Chrome's
color picker interface (part of the dev tools panel) which allows one to choose any pixel of
the current web page to set as a color property's value. Though hugely convenient for visual
design, color selection being limited to the context of the page leaves much to be desired.
/ This partial solves the limitation by affixing an unobtrusive panel to your page to act as
a makeshift color palette to use in conjunction with the eyedropper. The panel is populated
with small squares representing a list of colors passed into the partial via local. Viola!
/ @local [Array<String>] colors List of values valid for `background-color` CSS property
SteveBenner / dl-tatw.rb
Created May 17, 2015 16:48
Web scraper that downloads archived episodes of 'Trance Around The World' podcast
#!/usr/bin/env ruby
# This is a web scraper which downloads mp3 files from the TATW web archives.
# Usage: run this script and pass it an episode range to download via arguments
# Dependencies: requires 'aria2' to be installed (uses the CLI tool 'aria2c')
require 'pathname'
require 'colorize' # Use of this gem is optional; it makes the output prettier
SteveBenner / gh-starred.rb
Created March 15, 2015 09:46
Produce a Markdown file enumerating the starred repos of a GitHub user (with HTML links) using the Unicorn API gem
# The 'github_api' gem is implicility assumed to have been loaded at this point...
# Configuration data is passed to Github::Client#new as a Hash whose keys are Symbols
user: 'github-username',
login: '',
oauth_token: 'personal-access-token' # one of many valid authentication methods (see the gem docs for more)
# Data is returned from the API as a Github::ResponseWrapper object
SteveBenner /
Last active April 23, 2022 18:28 — forked from lfender6445/gist:9919357
Pry cheat sheet

Pry Cheat Sheet

Youtube Tutorial (2013)

Command Line

  • pry -r ./config/app_init_file.rb -- load your app into a pry session (look at the file loaded by
  • pry -r ./config/environment.rb -- load your rails into a pry session


SteveBenner / flatdoc.slim
Last active October 5, 2016 14:27
Slim template for Flatdoc
/ This is a Slim recreation of the Flatdoc example template provided here:
/ Flatdoc is a simple way to generate a documentation page from Markdown
/ More info is available on their website:
/ The main alterations noticeable in this version of the template are:
/ - Emphasis is placed on using variables and interpolation often, key advantages of Slim
/ - The GitHub button links have been replaced with a Web Component version, which I
find to be superior to using an iFrame. Just uncomment the original code to revert.
SteveBenner /
Last active August 29, 2015 14:09
Useful Regular Expressions I’ve come up with

Regular Expressions

Text coloring / highlighting

I use the following regexes with [iTerm2][iterm]'s ['trigger' feature][it1] to create some basic syntax highlighting.

(?<=- )([A-Z][A-Z ]+:)+ Colorize CONSTANTS Magenta
(?<=- )(:|")\w*"?(?= =>) Colorize :keys => / "keys" => Yellow
^([^=]*)(?==) Colorize ENV_VARS Cyan
(?&lt;=[^=])= Colorize the = separator Dark Grey

body.loading:after {
/* with no content, nothing is rendered */
content: "";
position: fixed;
/* element stretched to cover during rotation an aspect ratio up to 1/10 */
top: -500%;
left: -500%;
right: -500%;
bottom: -500%;
z-index: 9999;
/ This partial allows you to render the Coderwall badges of specified user
username = 'your-coderwall-username'
orientation = 'horizontal' # can be 'vertical' or 'horizontal'
/ Place the following tags in the HEAD section of your web page (omit jQuery if already present, of course)
link href="" media="all" rel="stylesheet" type="text/css"
script src=""
script src=""