This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GOPATH=/tmp/$$.installgobin GOBIN=$(go env GOROOT)/bin vim -u ~/.vimrc -c ":GoInstallBinaries" -c ":q" /tmp/src/$$.go |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Remove spurious CUPS files created in /tmp | |
find /private/tmp -maxdepth 1 -type l -name 55\*|sudo xargs rm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Pause the following Cloud Storage Services | |
services=('Google Drive' Copy Dropbox) | |
# Based on ideas and code on https://github.com/tjluoma/dropbox-pause-unpause | |
if [[ $0 =~ pause || $1 =~ pause ]] ; then | |
command=STOP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Google search from command line on a Mac | |
open "http://www.google.com/search?q=$(echo "$@" | sed -Ee 's/\s+/%20/g')" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the GNU utils instead of the BSD versions from OS X | |
# Updates the path if anythings with a gnubin dir changes after | |
# upgrade | |
if [[ -n "$(brew --prefix )" ]] ; then | |
if [[ -e ~/.GNUBINS ]] ; then | |
GNUBINS=$(cat ~/.GNUBINS) | |
else | |
echo "Not Found GNUBINS" | |
GNUBINS="___NotFoundGNUBINS___" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# ssh into a running Virtual Box guest machine | |
if [[ $# == 0 || $1 == -h || $1 == -? || $1 == --help ]] ; then | |
echo | |
echo usage: $(basename $0) '[<username>@]<machinename>' | |
echo | |
echo 'ssh into Virtual Box <machinename>, optionlly using <username>' | |
exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The MIT License (MIT) | |
Copyright (c) 2015 ajfisher | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
print("S",end='') | |
for i in range(int(10E3)): | |
print('o',end='') | |
print('n',end=None) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make the pi run file system check/repair on every boot (need to clear out old settings 1st) | |
sudo sed -i -e 's/ fsck\.\(repair\|mode\)=[^ ]*//; | |
s/$/ fsck.mode=force fsck.repair=yes/' /boot/cmdline.txt |