Help us brainstorm ideas, or hack an app to raise funds so that more women can do the amazing Summer of Code this year!
When: Saturday (tomorrow!), April 12th, 11h - 15h
Where: see below!
> mysql.serverstop --skip-grant-tables | |
> mysql | |
mysql> UPDATE mysql.user SET Password=PASSWORD('PASSWORD') WHERE User='root'; | |
mysql> FLUSH PRIVILEGES; | |
mysql> exit; | |
> mysql.server stop | |
> mysql.server start | |
Sources: | |
http://robots.thoughtbot.com/starting-and-stopping-background-services-with-homebrew |
function! RunSpec(lineNumber) | |
wall | |
let lineNumberSpecified = a:lineNumber | |
let fname = expand("%") | |
if fname =~ "spec" | |
let g:spec = fname | |
let g:specLineNum = a:lineNumber | |
endif | |
if exists("g:spec") | |
let cmd = '!./script/spin ' . g:spec |
uri_decode () { | |
ruby -e "require 'uri'; puts URI.decode '$1'" | |
} | |
uri_encode () { | |
ruby -e "require 'uri'; puts URI.encode '$1'" | |
} |
# thanks to http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/ | |
FILES_PATTERN='\.rb' | |
FORBIDDEN='puts ' | |
git diff --cached --name-only | \ | |
grep -E $FILES_PATTERN | \ | |
GREP_COLOR='4;5;37;41' xargs grep --color --with-filename -n $FORBIDDEN && \ | |
echo 'COMMIT REJECTED Found "$FORBIDDEN" references. Please remove them before commiting' && \ | |
exit 1 |
require 'rubygems' | |
require 'httparty' | |
require 'uri' | |
url = 'http://something.com' | |
options = { :http_proxyaddr =>'proxy.com' , :http_proxyport => 8080 } | |
response = HTTParty.get url ,options | |
puts url, response.code |
if ARGV.length != 1 | |
p "Provide a vodafone csv file you donkey!" | |
exit 666 | |
end | |
file = open(ARGV[0], 'r').read | |
# isolate the csv part of the vodafone data file... multiline regex match FTW!!! | |
BEGIN_MARKER="Call details for.*?\n" | |
END_MARKER=",,,,," |
# kill unnecessary intermediary directories | |
# requires shopt -s dotglob to move hidden files | |
function kid() { | |
if [ -z "$1" ]; then | |
echo "Provide a directory you donkey" | |
return | |
fi | |
mv $1/* . | |
rmdir $1 | |
} |