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
// @jbuchbinder | |
// | |
// Execute with: | |
// phantomjs --ssl-protocol=TLSv1 phantom-load.js URL | |
"use strict"; | |
var page = require('webpage').create(), | |
system = require('system'), | |
address; |
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 casper = require("casper").create({ | |
//loadImages: false, | |
//logLevel: 'debug', | |
verbose: true | |
}); | |
var utils = require('utils'); | |
/* ----- test parameters ----- */ |
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 | |
# | |
# notes-to-pdf.sh | |
# @jbuchbinder | |
# | |
# Use markdown-pdf to convert meeting notes/minutes in Markdown into nicely formatted | |
# PDF documents. Formatting: | |
# | |
# # Title | |
# ## Subtitle |
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 | |
## Solution from: http://stackoverflow.com/questions/26150533/join-avchd-mts-files-on-linux | |
## ffmpeg -i "concat:00000.MTS|00001.MTS|00002.MTS" -c copy output.m2ts | |
## File with .m2ts extension, etc | |
OUT="$1"; shift | |
## Format : "concat:00000.MTS|00001.MTS|00002.MTS" | |
IN="concat:$1"; shift |
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 | |
# Create 7x6 contact sheets | |
# @jbuchbinder | |
# | |
# Dependencies: | |
# - dcraw | |
# - imagemagick | |
SIZE=500 |
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
package main | |
import "vendor/coffee" | |
func main() { | |
cup, err := coffee.NewCoffee() | |
if err != nil { | |
panic() | |
} | |
for { |
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
VIDEO_FILE=$1 | |
VIDEO_FILE_FIXED=${VIDEO_FILE%.*}-fixed.${VIDEO_FILE##*.} | |
avconv -i $VIDEO_FILE -c:a pcm_s16le -vn audio.wav | |
normalize-audio audio.wav | |
avconv -i $VIDEO_FILE -i audio.wav -map 0:0 -map 1:0 -c:v copy -c:a libvo_aacenc $VIDEO_FILE_FIXED |
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
## Assemble timelapse into AVI | |
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:autoaspect:vqscale=3 \ | |
-vf scale=1920:1080 -mf type=jpeg:fps=23.97 'mf://*.JPG' \ | |
-o out.avi | |
## Convert to MP4 | |
HandBrakeCLI -Z Normal -O4 -i out.avi -o out.mp4 | |
## Concatenate into a single file | |
MP4Box -cat out1.mp4 -cat out2.mp4 -new out-combined.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
ffmpeg -i input.mp4 -vcodec copy -acodec copy -aspect 3:2 output.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 | |
for FC in $*; do | |
DLCODE=$( wget -O - -q "http://thevideo.me/cgi-bin/index_dl.cgi?op=get_vid_versions&file_code=$FC" | grep "Normal quality" | cut -d'"' -f6 ) | |
LANDINGURL="http://thevideo.me/download/$( echo $DLCODE | cut -d\' -f2 )/$( echo $DLCODE | cut -d\' -f4 )/$( echo $DLCODE | cut -d\' -f6 )" | |
wget -O /dev/null -q "$LANDINGURL" | |
sleep 2 | |
wget -c $( curl -s -X POST -d "op=download_orig&id=${FC}&hash=$( echo $DLCODE | cut -d\' -f6 )" "$LANDINGURL" | grep btn_download | cut -d'"' -f2 ) | |
done |