Skip to content

Instantly share code, notes, and snippets.

Si Beaumont simonjbeaumont

Block or report user

Report or block simonjbeaumont

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@simonjbeaumont
simonjbeaumont / bisect0001.out
Last active Aug 29, 2015
ocveralls vs. bisect coverage metrics
@simonjbeaumont
simonjbeaumont / check_subvendor_ids.sh
Created Jun 10, 2014
Script to check validity of subvendor ids
View check_subvendor_ids.sh
#!/bin/bash
SUBVENDOR_IDS=$(grep -P '^\t\t[0-9a-f]{4}' /usr/share/hwdata/pci.ids | cut -d' ' -f1 | tr -d '\t' | sort -u)
VENDORS=$(grep -P '^[0-9a-f]{4}' /usr/share/hwdata/pci.ids)
VENDOR_IDS=$(grep -P '^[0-9a-f]{4}' /usr/share/hwdata/pci.ids | cut -d' ' -f 1)
for svid in $SUBVENDOR_IDS; do
if [ $(echo "$VENDOR_IDS" | grep $svid) ]; then
echo "Found $svid"
else
@simonjbeaumont
simonjbeaumont / Makefile
Created May 13, 2014
Why does this have return code 0 when executed?
View Makefile
default:
ocamlfind ocamlc -o test_test -package oUnit -linkpkg -g test.ml
clean:
rm *.cmi *.cmo *.cmx test_test
@simonjbeaumont
simonjbeaumont / tmup
Last active Feb 17, 2019
Update bash to latest tmux environment on reattaching.
View tmup
#!/bin/bash
tmup ()
{
echo -n "Updating to latest tmux environment...";
export IFS=",";
for line in $(tmux showenv -t $(tmux display -p "#S") | tr "\n" ",");
do
if [[ $line == -* ]]; then
unset $(echo $line | cut -c2-);
@simonjbeaumont
simonjbeaumont / iTunes-goodies.sh
Created Mar 10, 2012
Three hidden goodies in iTunes (Terminal Hacks)
View iTunes-goodies.sh
#1: Invert iTunes Store links (Arrows name field browse Library)
defaults write com.apple.iTunes invertStoreLinks -bool YES
#2: Make [⌘F] focus the search input in iTunes
defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"
#3: Enable iTunes track notifications in the Dock
defaults write com.apple.dock itunes-notifications -bool true
#####
@simonjbeaumont
simonjbeaumont / gist:2007619
Created Mar 9, 2012
Enable iTunes Dock notifications
View gist:2007619
# Enable iTunes track notifications in the Dock
defaults write com.apple.dock itunes-notifications -bool true
You can’t perform that action at this time.