Skip to content

Instantly share code, notes, and snippets.

View wolfiex's full-sized avatar

Dan Ellis wolfiex

View GitHub Profile
@tskaggs
tskaggs / OSX-Convert-MOV-GIF.md
Last active November 5, 2024 21:41
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

@patrickhammond
patrickhammond / android_instructions.md
Last active October 13, 2024 21:08
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active November 16, 2024 05:51
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@lukehorvat
lukehorvat / es6-map-to-object-literal.js
Last active January 8, 2024 10:32
Convert ES6 Map to Object Literal
let map = new Map();
map.set("a", 1);
map.set("b", 2);
map.set("c", 3);
let obj = Array.from(map).reduce((obj, [key, value]) => (
Object.assign(obj, { [key]: value }) // Be careful! Maps can have non-String keys; object literals can't.
), {});
console.log(obj); // => { a: 1, b: 2, c: 3 }
@jadephilipoom
jadephilipoom / pdfdiff.bash
Last active February 9, 2022 04:52
Pretty PDF diff using wdiff and MarkDown
wdiff -n -w $'~~' -x $'~~' -y $'\\textcolor{blue}{' -z '}' base.md new.md | pandoc -o diff.pdf
@pfeodrippe
pfeodrippe / cors_server.py
Created March 29, 2016 22:17 — forked from enjalot/cors_server.py
Allow CORS with python simple http server
import SimpleHTTPServer
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def send_head(self):
"""Common code for GET and HEAD commands.
This sends the response code and MIME headers.
Return value is either a file object (which has to be copied
to the outputfile by the caller unless the command was HEAD,
and must be closed by the caller under all circumstances), or
@danieledler
danieledler / Infomap-Louvain-number-of-modules-comparison.ipynb
Last active July 4, 2018 14:14
Number of modules found with Infomap and Louvain community detection algorithms on fully connected network with different link weight thresholds
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active November 16, 2024 17:30
crack activate Office on mac with license file
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average