Skip to content

Instantly share code, notes, and snippets.

View frogonwheels's full-sized avatar

Michael frogonwheels

  • Perth, Australia
View GitHub Profile
@frogonwheels
frogonwheels / gist:7445670
Last active December 28, 2015 04:49
Avconv
avconv -i "${infile}" -r 50 -vf "yadif=0:-1:1,crop=in_w:in_h*6/8:1:in_h/8,scale=-1:360,pad=640:360:(ow-iw)/2:(oh-ih)/2,setsar=1:1" -af "volume=-3dB" -ar 48000 -b 3200k -codec:a aac -strict experimental -codec:v mpeg4 "${outfile}"
Outputs>
avconv version 10_alpha1-6:10~~git20131111.45ef963-1~ubuntu13.10.1, Copyright (c) 2000-2013 the Libav developers
built on Nov 11 2013 22:51:26 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu8)
[mpeg @ 0x1f82680] max_analyze_duration reached
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mpeg, from 'TheInvitation.VOB':
Duration: 00:04:57.47, start: 0.360000, bitrate: 7510 kb/s
./t3509-cherry-pick-merge-df.sh -v --debug -i
Cleaning trash directory.t3509-cherry-pick-merge-df
Initialized empty Git repository in c:/Projects/msysgit/git/t/trash directory.t3
509-cherry-pick-merge-df/.git/
expecting success:
mkdir a &&
>a/f &&
git add a &&
git commit -m a
while read line
do
ln -s $line "mydir
done < "myfile"
@frogonwheels
frogonwheels / git-incorporate
Created June 29, 2012 01:46
An idea for incorporating a topic branch
#!/bin/bash
gitdir=$(git rev-parse --git-dir)
if [ -z ${gitdir} ] ; then
exit 1
fi
if [ "$1" == "" ] ; then
echo Syntax: incorporate branchname
exit 1
Minecraft 1.2.5 (1333544508000)
Machine A: Amd64 Mythbuntu - Ubuntu 12.04 LTS 3.2.0-25-generic #40-Ubuntu SMP Wed May 23 20:30:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
01:05.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI RS880 [Radeon HD 4250] [1002:9715]
@frogonwheels
frogonwheels / WordCompare.vbs
Created September 30, 2011 01:10
Compare word documents
' Created by: Michael Geddes
' Access to CLI Arguments
Set args = WScript.Arguments
if args.count = 0 then
ShowHelp
WScript.Quit 1
end if
An encrypted file can be recognized by the "file" command, if you add these
lines to "/etc/magic", "/usr/share/misc/magic" or wherever your system has the
"magic" file:
0 string VimCrypt~ Vim encrypted file
>9 string 01 - "zip" cryptmethod
>9 string 02 - "blowfish" cryptmethod
@frogonwheels
frogonwheels / gist:897695
Created April 1, 2011 03:49
Add a git sign-off message using fugitive
fun! AddGitSign()
let idx=line('$')
while idx > 0 && getline(idx) =~ '^#'
let idx-=1
endwhile
let sign=['Signed-off-by: '.fugitive#buffer().repo().user()]
if idx == 0 || getline(idx) != ''
call insert(sign,'')
endif
call append(idx, sign)
@frogonwheels
frogonwheels / backup git.bat
Created January 6, 2011 02:40
Backup git repos
@echo off
setlocal ENABLEDELAYEDEXPANSION
rem Search for the backup drive!
set volname=Backup Volumne
set bkd=
for %%i in (D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
for /f "usebackq tokens=*" %%j in (`vol %%i: 2^>nul`) do (
set msg=%%j#
" Make sure trailing spaces are removed before write
fun! s:NoTrail()
let pos=getpos('.')
silent %s/\s\+$//e
call setpos('.',pos)
endfun
au BufWritePre * call <SID>NoTrail()
" vim: ts=2 et sw=2