View vid-cut-aac.cmd
:: @ECHO OFF
for %%i in ("%cd%") do SET OUT="%%~nxi"
SET BITRATE="10000000"
SET RATIO="1920:1080"
:: x264 main profile, veryfast cpu, lossless, level is kinda like version
:: -preset veryfast -qp 0
:: 60fps, keyframe every 2s
ffmpeg -loglevel panic -i %3 -i %4 -map 0:v -map 1:a -vb %BITRATE% -minrate %BITRATE% -maxrate %BITRATE% -bufsize %BITRATE% -aspect %RATIO% -s %RATIO% -c:v libx264 -profile:v main -level 3.1 -r 60 -g 120 -keyint_min 120 -x264opts "keyint=120:min-keyint=120:no-scenecut" -c:a aac -ab 48000 -ac 2 -f avi -ss %1 -to %2 %OUT%.avi
View gist:62f85ef2f355e65bcb39918e702c363d
#!/bin/bash
OUT=`basename "$PWD"`.avi
BITRATE=10000000
RATIO=1920:1080
# x264 main profile, veryfast cpu, lossless, level is kinda like version
# -preset veryfast -qp 0
# 60fps, keyframe every 2s
ffmpeg -i "$3" -i "$4" \
-map 0:v -map 1:a \
View gist:0f1b278832adf827fd8c647fa05522c3
<StreamWriter(gpgi-output(gpg --status-fd=2 --passphrase-fd=0 --no-use-agent --enable-progress-filter --batch --verbose --with-colons --utft
<StreamWriter(gpgi-output(gpg --status-fd=2 --passphrase-fd=0 --no-use-agent --enable-progress-filter --batch --verbose --with-colons --utft
Traceback (most recent call last):
File "/Mailpile/mailpile/crypto/gpgi.py", line 442, in writeout
fd.write(line)
IOError: [Errno 32] Broken pipe
Traceback (most recent call last):
File "/Mailpile/mailpile/crypto/gpgi.py", line 442, in writeout
fd.write(line)
IOError: [Errno 32] Broken pipe
View mg-env
#!/usr/bin/env perl
use strict;
use warnings;
use 5.014;
use Getopt::Long qw(:config gnu_getopt);
use App::Multigit qw(mg_each);
use Path::Class;
use Future;
View gist:215f7fa96ad6b7bf1943
[alias]
lg = log --graph --decorate --branches --oneline --remotes --tags --all
st = status
co = checkout
ci = commit
cdiff = diff --cached
yoink = cherry-pick
[status]
submodulesummary = true
View gist:fbffa497f3de7e1c1959
perl -Ilib -MTest::WWW::Mechanize::Roles -MTest::WWW::Mechanize::Roles::JSON -E'package J; use Moose; extends "Test::WWW::Mechanize::Roles"; with "Test::WWW::Mechanize::Roles::JSON"; package main; my $j = J->new; $j->json_ok'
View gist:0bee9624daf3a76f1044
function sunzip() {
unzip -l "$1" | \
head -n -2 | \
tail -n +4 | \
perl -lnE'$dirs{((split " ")[3] =~ m!([^/]*)!)[0]}++ } { exit 1 if keys %dirs > 1'
if [[ "$?" -eq "0" ]]; then
unzip "$1"
else
EXDIR="${1/%.zip/}"
View template.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Text::Template 'fill_in_file';
use 5.010;
my $template = shift;
my @content = <>;
say fill_in_file($template,
View gist:a2fbc52591181936797e
// ==UserScript==
// @name Ultimate Guitar cleanup
// @version 0.1
// @match http://tabs.ultimate-guitar.com/*
// ==/UserScript==
(function() {
var tab = document.getElementById('cont');
var body = document.body;
while (body.hasChildNodes()) {
View anagram
#!/usr/bin/env perl
use strict;
use warnings;
use 5.014;
my $letters = lc sort_letters(shift);
my $dict = shift // '/usr/share/dict/words';