$ brew install ffmpeg
$ brew install gifsicle
This file contains 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
// https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API | |
function toggleFullscreen(el, fallback){ | |
var body = document.body | |
// fullscreen API not supported, use fallback if given | |
if( !body.requestFullscreen && | |
!body.webkitRequestFullScreen && | |
!body.msRequestFullscreen && | |
!body.mozRequestFullScreen |
This file contains 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
determineFn = function(fn, ctx){ | |
// look for function name on the context | |
if( _.isString(fn) ){ | |
if( !ctx ){ | |
console.error('Could not bind onClick “'+fn+'”; please provide a context') | |
fn = null; | |
}else if( ctx[fn] && _.isFunction(ctx[fn]) ){ |
This file contains 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
<?php | |
/** | |
* Convert a comma separated file into an associated array. | |
* The first row should contain the array keys. | |
* | |
* Example: | |
* | |
* @param string $filename Path to the CSV file | |
* @param string $delimiter The separator used in the file | |
* @return array |
This file contains 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
/* | |
Demo styles | |
*/ | |
@import 'lib/elements.less'; // http://lesselements.com/ | |
@import 'lib/flexbox-mixins.less'; // https://gist.github.com/kjantzer/7948269 | |
body { | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
font-smoothing: antialiased; |
This file contains 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
tell application "QuickTime Player" | |
activate | |
new screen recording | |
tell application "System Events" to key code 49 | |
end tell |
This file contains 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
void setFrame(UIView* view, NSNumber* x, NSNumber* y, NSNumber* w, NSNumber* h) | |
{ | |
CGRect f = view.frame; | |
if( x ) f.origin.x = x.floatValue; | |
if( y ) f.origin.y = y.floatValue; | |
if( w ) f.size.width = w.floatValue; | |
if( h ) f.size.height = h.floatValue; | |
view.frame = f; |
This file contains 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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
This file contains 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
# http://stackoverflow.com/a/28818420/484780 | |
git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1` |
The script uses Backbone Modal to display spinners and alerts
You must update apiURL
to reflect your internal upload api.
If you wish to use the useImgur
option, make sure to set imgurClientID
(get it here http://api.imgur.com/)
var attachment = new Attachment({el: yourElement})
attachment.on('upload:success', function(resp, file, xhttp){
NewerOlder