Skip to content

Instantly share code, notes, and snippets.

View alanjosephwilliams's full-sized avatar

Alan Joseph Williams alanjosephwilliams

  • Propel
  • United States
View GitHub Profile
@matthutchinson
matthutchinson / poolsider
Created February 5, 2015 20:32
Grab all http://poolside.fm tracks from SoundCloud with this one weird trick!
#!/bin/sh -x
# no python3 (pip3) or curl? use this
# brew install python3 curl
# https://github.com/flyingrub/scdl
# pip3 install scdl
curl -s http://poolsideapi2.herokuapp.com/tracks?p=2 | grep -o '"scUrl": ".*",$' | sed -E 's/("scUrl": "|",.*$)//g' | xargs -I 'url' scdl -l url --hidewarnings
anonymous
anonymous / gist:8057249
Created December 20, 2013 16:23
'diamondz'
// motion blur hack starts here \\
int samplesPerFrame = 32;
int numFrames = 48;
float shutterAngle = 1.25;
int[][] result;
float time;
void setup() {
size(500, 500, P2D);
@tskaggs
tskaggs / OSX-Convert-MOV-GIF.md
Last active July 3, 2025 01:34
Creating GIFs from .MOV files in OSX using FFmpeg and ImageMagick

Convert MOV to GIF using FFmpeg and ImageMagick

I tried a few different techniques to make a GIF via command-line and the following gives me the best control of quality and size. Once you're all setup, you'll be pumping out GIFs in no time!

Preparation

Install FFmpeg

  • $ brew install ffmpeg [all your options]
    • Example: $ brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools

Install ImageMagick

@thisandagain
thisandagain / gist.md
Last active December 15, 2015 14:38
Always Command+V as "Paste and Match Style" (without formatting)

Instructions (Mac OS X)

  • Open "System Preferences"
  • Select "Keyboard"
  • Select tab "Keyboard Shortcuts"
  • Select "Application Shortcuts" from the left list box
  • Click "+" below the right list box
  • Select "All Applications" for "Application" input box
  • Type "Paste and Match Style" into the "Menu Title" input box
  • In the "Keyboard Shortcut" input box, type command-v
@them0nk
them0nk / rspec_rails_cheetsheet.rb
Created March 23, 2012 03:39
Rspec Rails cheatsheet (include capybara matchers)
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)
@tecoholic
tecoholic / osm2geo.js
Created November 27, 2011 04:57
OSM2GEO - A JS Converter to convert OSM to GeoJSON
/**************************************************************************
* OSM2GEO - OSM to GeoJSON converter
* OSM to GeoJSON converter takes in a .osm XML file as input and produces
* corresponding GeoJSON object.
*
* AUTHOR: P.Arunmozhi <aruntheguy@gmail.com>
* DATE : 26 / Nov / 2011
* LICENSE : WTFPL - Do What The Fuck You Want To Public License
* LICENSE URL: http://sam.zoy.org/wtfpl/
*