- If you haven’t already:
brew install ffmpeg gifsicle imagemagick
. - Open QuickTime Player.
- File > New Screen Recording.
- Record.
- Save as
recording.mov
. ffmpeg -i recording.mov -r 24 recording-%03d.png
convert recording-001.png palette.gif
Note: you may need to pick a different frame for better results!convert -dither none -remap palette.gif recording-*.png recording-uncompressed.gif
gifsicle --optimize=3 --delay=4 < recording-uncompressed.gif > recording.gif
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// time and time end | |
console.time("This"); | |
let total = 0; | |
for (let j = 0; j < 10000; j++) { | |
total += j | |
} | |
console.log("Result", total); | |
console.timeEnd("This"); | |
// Memory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Sample /etc/sudoers file. | |
# | |
# This file MUST be edited with the 'visudo' command as root. | |
# | |
# See the sudoers man page for the details on how to write a sudoers file. | |
## | |
# Override built-in defaults | |
## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* PostgresMiddleware.js | |
* | |
* Handles postgres queries and caching to redis | |
* see README for usage | |
* | |
*/ | |
var pg = require('pg'), | |
crypto = require('crypto'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ******************************************************************************************* | |
* THE UPDATED VERSION IS AVAILABLE AT | |
* https://github.com/LeCoupa/awesome-cheatsheets | |
* ******************************************************************************************* */ | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
console.log('yay gist') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# REQUIRES SUDO | |
# Benchmark runner | |
repeats=20 | |
output_file='benchmark_results.csv' | |
command_to_run='echo 1' | |
run_tests() { | |
# -------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Basic form | |
*/ | |
module.exports = App.ValidatableFormComponent = Ember.Component.extend({ | |
/** | |
* @type {String} | |
*/ | |
tagName: 'form', |
This baby registers an Ember Handlebars helper using @aterrien's awesome jQuery-Knob
Usage:
and vuala!!! you've got yourself a knob. options:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ember-timeago.js | |
// Using momentjs to provide neat helper for fromNow() calls. | |
App.Clock = Em.Object.create({ | |
seconds: 0, | |
minutes: 0, | |
hours: 0, | |
init: function() { | |
this.tick(); | |
}, |
NewerOlder