This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
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!
Install FFmpeg
Install ImageMagick
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
#target photoshop | |
/* Open the given file, and compress with TinyPNG. */ | |
function compressFile(file) { | |
var document = open(file); | |
if (document.mode == DocumentMode.INDEXEDCOLOR) { | |
document.changeMode(ChangeMode.RGB); | |
} |
# If you open your Ressource monitoring under OSX, you'll see that the | |
# Process "Spotify Helper" is eating between 20% and 30% of CPU constantly | |
# It means that when you're on battery, it'll drain it faster. | |
# To prevent the Spotify Helper (which are basically ads for spotify) from spawning process, | |
# you should disable access to the app doing this (close Spotify first) : | |
sudo chmod 000 "/Applications/Spotify.app/Contents/Frameworks/Spotify Helper EH.app" | |
sudo chmod -N "/Applications/Spotify.app/Contents/Frameworks/Spotify Helper EH.app" |
module Foo | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
module ClassMethods | |
def bar | |
puts 'class method' | |
end | |
end |
Options included below:
docker-compose
brew
This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew
any longer. Instead consider adding a barebones docker-compose.yml
for each project and run docker-compose up
to start each project's mysql service.
/** | |
* Stand alone polyfill allow only numbers on input of type number. | |
* | |
* While input filtering is already supported by default by some browsers, maximum length has not been implemented by | |
* any. This script will solve both issue and make sure that only digits can be entered in input elements of type | |
* number. If the optional attribute `max` is set, it will calculate it's length and mimic the `maxlength` behavior on | |
* input of type text. | |
* | |
* Supports: | |
* |
# nonsense.rb | |
# a markov chain of varying depth | |
# USAGE: make a new nonsense tree, add lines, then chain! | |
# > non = Nonsense.new 2 | |
# > non.add_line "What is happening" | |
# > non.add_line "The world is on fire" | |
# > non.chain | |
# => "What won hat woren ire worenis hape" | |
class Nonsense |
fuck all this https://media.giphy.com/media/O1IDb3Wo98iGY/giphy.gif
angry panda https://media.giphy.com/media/1hiVNxD34TpC0/giphy.gif
Failure http://i.imgur.com/cWX4Fjf.gifv
TayTay http://i.giphy.com/Lk9SktDAGzYUU.gif
obama holdup https://media.giphy.com/media/Gubfnt4gJtnOw/giphy.gif