Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
# first see the current origin | |
git remote -v | |
# now we delete the origin | |
git remote rm origin | |
# now we set the new origin | |
git remote add origin git@github.com:user/reponame.git | |
# optional: make git pull and push from someremote (on our case, origin) |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>net.hecticjeff.firewall</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>sh</string> | |
<string>-c</string> |
function pless { | |
pygmentize -O encoding=UTF-8 $1 | less -r | |
} |
#!/usr/bin/env ruby | |
# API Documentation at http://api.wikia.com/wiki/LyricWiki_API | |
require 'open-uri' | |
require 'json' | |
require 'tmpdir' | |
ARTIST = "Johnny Cash" |
#!/bin/sh | |
setup_brew () { | |
if ![-f "/usr/local/bin/brew"]; then | |
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" | |
fi | |
} | |
setup_ipython () { | |
brew install readline |
filter { | |
## This will pull out unnecessary and repeated celery information about it starting jobs. This goes first so that it doesn't get mutated later. | |
grep { | |
type => "celeryd" | |
match => ["@message", "^([D|d]ebug|DEBUG|[N|n]otice|NOTICE|[I|i]nfo|INFO|[W|w]arn?(?:ing)?|WARN?(?:ING)?|[E|e]rr?(?:or)?|ERR?(?:OR)?|[C|c]rit?(?:ical)?|CRIT?(?:ICAL)?) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3} .*?$"] | |
negate => true | |
} | |
## This will capture the message in the format time: severity/process message . This is capturing the data and tagging it so that it can be exported to our GELF format later | |
grok { | |
match => ["@message", "\[%{DATESTAMP:timestamp}: %{DATA:severity}/%{DATA:process}\] %{DATA:message}$"] |
#!/bin/bash | |
cd ~/workspace | |
echo -e "\n\033[1mPulling all repositories...\033[0m\n" | |
for i in $(find . -maxdepth 1 -mindepth 1 -type d -type d); do | |
echo -e "\033[1m"+$i+"\033[0m"; cd $i; git pull --rebase; | |
cd .. | |
done |
#!/bin/bash | |
# Add to your .bashrc on Mac OSX, then run camfix in Terminal | |
# if the Mac's built-in camera stops working. | |
# Thanks to: http://osxdaily.com/2013/12/27/fix-there-is-no-connected-camera-error-mac/ | |
alias camfix='sudo killall VDCAssistant; sudo killall AppleCameraAssistant' |
from os.path import splitext | |
from django.core.exceptions import ValidationError | |
from django.utils.translation import ugettext_lazy as _ | |
from django.template.defaultfilters import filesizeformat | |
class FileValidator(object): | |
""" | |
Validator for files, checking the size, extension and mimetype. |