Skip to content

Instantly share code, notes, and snippets.

View ludamillion's full-sized avatar
🕊️

Luke Inglis ludamillion

🕊️
View GitHub Profile
@afeld
afeld / gist:5704079
Last active June 6, 2025 21:03
Using Rails+Bower on Heroku
@SaraSoueidan
SaraSoueidan / scrollbar-mixin
Created July 26, 2013 18:18
Sass mixin for styling scrollbars in webkit by Hugo Giraudel (http://codepen.io/HugoGiraudel/pen/KFDuB)
/**
* Mixin scrollbar
*/
@mixin scrollbar($size, $primary, $secondary: lighten($primary, 25%)) {
::-webkit-scrollbar {
width: $size;
height: $size;
}
::-webkit-scrollbar-thumb {
@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

@akiva
akiva / gist:6500042
Last active October 28, 2024 23:26
Vim regex to convert hash rocket syntax to modern colon style syntax for hashes with symbol-based keys
%s/:\(\w*\)\(\s\+\)\?=>/\1:/gc
@mheadd
mheadd / curl-li.sh
Last active December 23, 2015 22:49
Unix command-line magic for fetching list of L&I licensed entities and saving to a simple CSV file.
curl -s "http://services.phila.gov/PhillyApi/Data/v1.0/licenses?%24filter=substringof(%273381%27,license_type_code)%20eq%20true&%24expand=locations&%24format=json" \
| jq .d.results[] \
| jq '[.pri_contact_last_name, .pri_contact_first_name, .pri_contact_company_name, .pri_contact_address1, .pri_contact_city, .pri_contact_state, .pri_contact_zip, .license_number, .license_type_name, .license_type_code]' \
| jq @csv \
| sed 's/\\//g;s/""/"/g' \
> filename.csv
@lyoshenka
lyoshenka / search-git-history.md
Last active April 1, 2025 07:51
Search Git commit history for a string and see the diffs

Searching Git commit history

This should be one of the core features of Git, but for some reason it's impossible to figure out how to search for a string in your commit history and see the diffs that that string is in. Here's the best I've come up with:

To find which commits and which files a string was added or removed in:

git log -S'search string' --oneline --name-status

To see the diff of that

@XVilka
XVilka / TrueColour.md
Last active July 16, 2025 09:53
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

int[][] result;
float time;
void draw() {
for (int i=0; i<width*height; i++)
for (int a=0; a<3; a++)
result[i][a] = 0;
for (int sa=0; sa<samplesPerFrame; sa++) {
time = map(frameCount-1 + sa*shutterAngle/samplesPerFrame, 0, numFrames, 0, 1);
@kany
kany / redis-resque-stuff.md
Last active June 28, 2022 05:33
Clearing dead/stuck/zombie Resque workers redis resque delayed_job

$ rails c

Loading development environment (Rails 3.1.3)
1.9.3p0 :002 > Resque::Worker.working.each{|w| w.done_working}

$ redis-cli

# Removes data from your connection's CURRENT database.
  • Dynamic Dispatch
  • Dynamic Method
  • Ghost Methods
  • Dynamic Proxies
  • Blank Slate
  • Kernel Method
  • Flattening the Scope (aka Nested Lexical Scopes)
  • Context Probe
  • Class Eval (not really a 'spell' more just a demonstration of its usage)
  • Class Macros