ffmpeg \
-fflags +genpts `# http://superuser.com/a/710087` \
-i Hawaii.Five-0.2010.S01E01.avi \
-vcodec copy `# copy the video` \
-acodec aac -strict -2 `# re-encode the audio as aac` \
Hawaii.Five-0.2010.S01E01.mp4
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
#!/bin/bash | |
# Usage: | |
# listBBRepos.sh [bitbucket username] | |
curl -su "$1" https://api.bitbucket.org/1.0/users/"$1" | perl -MJSON -MData::Dumper -ne' | |
my $data = from_json($_); | |
foreach my $repo (@{$data->{repositories}}) { | |
print $repo->{slug}, "\n"; | |
}' |
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
#!/bin/bash | |
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend |
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
/*jslint plusplus:true, white:true */ | |
/*global console:false */ | |
function secondMonday(year, month) { "use strict"; | |
var firstDay = new Date(year, month, 1); | |
if(firstDay.getDay() !== 1) { | |
firstDay.setDate( | |
firstDay.getDay() === 0 ? 2 : 9 - firstDay.getDay() | |
); | |
} |
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
/*jslint white:true */ | |
/*global console */ | |
function lastFridayOfMonth(year, month) { "use strict"; | |
var lastDay = new Date(year, month+1, 0); | |
if(lastDay.getDay() < 5) { | |
lastDay.setDate(lastDay.getDate() - 7); | |
} | |
lastDay.setDate(lastDay.getDate() - (lastDay.getDay() -5)); | |
return lastDay; |
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
#import <Foundation/Foundation.h> | |
NSString *const retirementUrl = @"https://query.yahooapis.com/v1/public/yql/homerj/retirement?format=json"; | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
// insert code here... | |
NSURLSession *session = [NSURLSession sharedSession]; | |
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
main | |
*.o |
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
/*jslint white:true, unparam:true, browser:true */ | |
/*global $, casper, console, jQuery */ | |
(function() { | |
"use strict"; | |
var casper = require('casper').create(); | |
console.log("Starting..."); | |
casper.start('http://themeforest.net/user/oxygenna/portfolio?direction=desc&order_by=sortable_at&view=grid', function() { | |
console.log('scraping'); | |
var rv = this.evaluate(function() { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Bootstrap 101 Template</title> | |
<!-- Bootstrap --> |
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
var myFrames = []; | |
function mkLog(name) { | |
return function() { | |
console.log('unloading ' + name); | |
}; | |
} | |
(function walk(d) { | |
var doc = d.contentDocument || d, i, iframes = doc.getElementsByTagName('iframe'); | |
console.log('found ' + iframes.length + ' iframes'); | |
myFrames.push({ doc :doc, frame : d.contentDocument, node : d, id : d.id, name:d.name }); |
OlderNewer