Skip to content

Instantly share code, notes, and snippets.

View papaben's full-sized avatar

Benjamin VanEvery papaben

View GitHub Profile
@papaben
papaben / System Info.txt
Created May 3, 2012 07:08
brew install -v transcode fails on mac 10.6.8
Formula: brew install -v transcode
[579]$ brew --config
HOMEBREW_VERSION: 0.9
HEAD: 5bf4744d97a26fd60672555ebdba3d6764ed3918
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.6.8
Kernel Architecture: x86_64
@papaben
papaben / brew.log
Created May 3, 2012 07:10
brew install -v transcode fails on mac 10.6.8 - log
==> Downloading http://download.berlios.de/tcforge/transcode-1.1.5.tar.bz2
Already downloaded: /Users/bvanevery/Library/Caches/Homebrew/transcode-1.1.5.tar.bz2
/usr/bin/tar xf /Users/bvanevery/Library/Caches/Homebrew/transcode-1.1.5.tar.bz2
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file export/export_ffmpeg.c
patching file import/decode_lavc.c
patching file import/probe_ffmpeg.c
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/transcode/1.1.5 --enable-a52 --enable-faac --enable-imagemagick --enable-libdv --enable-ogg --enable-libquicktime --enable-theora --enable-vorbis --enable-libxml2 --enable-lzo --enable-x264 --enable-xvid --enable-sdl --without-x --build=x86_64-apple-darwin10.0.0
@papaben
papaben / install.log
Created May 3, 2012 17:17
brew install -v transcode fails on mac 10.6.8 - log
bvanevery@bvanevery-2011-mb 2012-05-03 10:14:30 /usr/local (master)]
[591]$ brew rm -f libvorbis
Uninstalling libvorbis...
[bvanevery@bvanevery-2011-mb 2012-05-03 10:14:40 /usr/local (master)]
[592]$ brew install -v transcode
==> Installing transcode dependency: libvorbis
==> Downloading http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.bz2
Already downloaded: /Users/bvanevery/Library/Caches/Homebrew/libvorbis-1.3.2.tar.bz2
/usr/bin/tar xf /Users/bvanevery/Library/Caches/Homebrew/libvorbis-1.3.2.tar.bz2
@papaben
papaben / config.xml
Created July 24, 2012 06:20
Jenkins configuration for PHP quality metrics
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description>Run php quality metrics on the code base.&#xd;
&#xd;
&lt;div style=&quot;float: left&quot;&gt;&#xd;
&lt;div style=&quot;&#xd;
text-align: right;&#xd;
margin-right: 3em;&#xd;
font-size: 4em;&#xd;
@papaben
papaben / ssh.bash
Created May 13, 2013 22:02
The bash completion file I'm using for ssh and scp
##
# Complete SSH with known hosts or configured hosts
##
_complete_ssh_hosts ()
{
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ssh_hosts=$(if [ -f ~/.ssh/known_hosts ]; then
cat ~/.ssh/known_hosts | \
cut -f 1 -d ' ' | \
<?php
function resetToMaster()
{
$command = new \Bart\Shell\Command('git reset --hard %s/%s', 'origin', 'master');
try {
$command->run();
}
catch (\Bart\Shell\CommandException $e) {
echo "Problem resetting to master {$e->getMessage()}";
@papaben
papaben / ps1.bash
Created August 15, 2013 19:03
Bash PS1
# Red if last command failed
function __last_cmd_code_ps1() {
local red='\033[00;31m' # red
if [ $1 -ne 0 ]; then
echo -e "${red}*!!**${1}**!!*${red}"
return
fi
}
@papaben
papaben / pre-receive
Last active August 29, 2015 13:56
Git Hook pre-receive.d invoker
#!/bin/bash
# This script will run every script it finds in pre-receive.d
# ...passing along STDIN
# This can accompany https://github.com/box/bart/wiki/Git-Hooks
HOOKNAME=$(basename $0)
if [ -d "$GIT_DIR/hooks" ]; then
HOOKDIR="${GIT_DIR}/hooks/${HOOKNAME}.d"
else
@papaben
papaben / git.sh
Created April 18, 2014 20:51
My typical answer when git asks, "Did you mean?"
##
# "I did [mean that]"
# Re-run the suggested git command
# Intended to be run as 'idid !!'
##
function idid() {
declare last=''
while [[ $# > 0 ]]; do
last="$last $1"
@papaben
papaben / add-host-to-known_hosts.sh
Created January 11, 2016 22:24
Automatically add several hosts to known_hosts
#! /usr/bin/env bash
#
# In a situation in which you are ssh'ing into a set of servers, and you are
# confident about their trustability, but the current server doesn't "know"
# them yet. This script will add their signatures into your known_hosts file
# if it is not yet there.
##
declare KNOWN_HOSTS_FILE="$HOME/.ssh/known_hosts"
declare server_ip=