Skip to content

Instantly share code, notes, and snippets.

View tekkub's full-sized avatar

Tekkub tekkub

View GitHub Profile
@tekkub
tekkub / gist:1243200
Created September 26, 2011 19:44 — forked from stouset/gist:1243185
@tekkub
tekkub / gist:1203061
Created September 8, 2011 10:02
Git aliases to prune merged branches
[alias]
prunelocal = !sh -c 'git branch -d `git branch --merged | grep -v "^*" | tr -d "\\n"`'
pruneorigin = !sh -c 'git push origin `git branch -r --merged | grep \"^ origin/\" | grep -v "/master$" | sed "s/origin./:/g" | tr -d "\\n"`'
@tekkub
tekkub / gist:1052555
Created June 29, 2011 00:08
Google -1
https://plusone.google.com/*
www.google.com##BUTTON[name="eswidget"]
@tekkub
tekkub / gist:801540
Created January 29, 2011 04:34 — forked from gcr/gist:46306
THIS GIST SHOULD BE FILLED WITH BEES.
__ __ __ __ __
/ \ / \ / \ / \ / \
/ B \__/ \__/ \__/ B \__/ \
\ / \ B / \ B / \ B / \ /
\__/ \__/ \__/ \__/ \B_/
/ \ / \ / \ B / \ B / \
/ \__/ \__/ B \__/ \__/ B \
\ / \ B / \ / \ / \ /
[01:18:34] Interface\FrameXML\RestrictedExecution.lua:397: Call failed: Interface\FrameXML\RestrictedExecution.lua:397: Call failed: Interface\FrameXML\RestrictedExecution.lua:124: Direct table creation is not permitted
[C]: ?
[C]: ?
Interface\FrameXML\RestrictedExecution.lua:397: in function <Interface\FrameXML\RestrictedExecution.lua:390>
(tail call): ?
Interface\FrameXML\SecureGroupHeaders.lua:108: in function `SetupUnitButtonConfiguration'
Interface\FrameXML\SecureGroupHeaders.lua:158: in function <Interface\FrameXML\SecureGroupHeaders.lua:115>
Interface\FrameXML\SecureGroupHeaders.lua:458: in function `SecureGroupHeader_Update'
Interface\FrameXML\SecureGroupHeaders.lua:57: in function <Interface\FrameXML\SecureGroupHeaders.lua:52>
[C]: in function `SetAttribute'
@tekkub
tekkub / gist:718449
Created November 28, 2010 00:50
TimeMachine chome history ignorance
for year in 2010 2011 2012
do
for month in 01 02 03 04 05 06 07 08 09 10 11 12
do
sudo defaults write /Library/Preferences/com.apple.TimeMachine SkipPaths -array-add "~tekkub/Library/Application Support/Google/Chrome/Default/History Index $year-$month-journal"
sudo defaults write /Library/Preferences/com.apple.TimeMachine SkipPaths -array-add "~tekkub/Library/Application Support/Google/Chrome/Default/History Index $year-$month"
done
done
@tekkub
tekkub / docx_to_markup.rb
Created November 2, 2010 21:39
Word docx files suck!
#!/usr/bin/env ruby
# Converts those nasty xml documents word likes to create into something
# remotely resembling markdown
# Fun side effect: you'll get every revision of the document!
abort "No file name given" unless filename = ARGV.first
remove_tags = [
'\?xml',
@tekkub
tekkub / gitsvn.md
Created October 26, 2010 23:47 — forked from latortuga/gitsvn.md

Some of this is pulled directly from the git-svn man page.

Push a local git-branch to a new remote new-svn-branch

git svn branch new-svn-branch

now there is a new remote tracking branch, confirm with

git branch -r
@tekkub
tekkub / remux_for_appletv.rb
Created October 20, 2010 21:05
Remux that shit!
#!/usr/bin/env ruby
raise "Specify a video file!" unless mkv_file = ARGV.first
audio_file = mkv_file.gsub(/\.mkv/, ".ac3")
audio_track_file = mkv_file.gsub(/\.mkv/, ".mp4")
video_file = mkv_file.gsub(/\.mkv/, ".264")
m4v_file = mkv_file.gsub(/\.mkv/, ".m4v")
VLC_PATH = "/Applications/VLC.app/Contents/MacOS/VLC"
MP4BOX_PATH = "/Users/tekkub/bin/MP4box"
@tekkub
tekkub / mkv2m4v.sh
Created October 11, 2010 03:37 — forked from innerfence/mkv2m4v.sh
mkv to m4v remuxer
#!/bin/bash
#
# mkv2m4v inputfile.mkv
#
# Given an MKV container with H.264 video and AC3 audio, converts
# quickly to an iPad-compatible MP4 container without re-encoding the
# video (so it must already be in an iPad-compatible resolution); the
# audio is downmixed to stereo with Dynamic Range Compression.
#