RailsGirls Summer of Code Fundraising Workshop Tomorrow!
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!
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 |
# here's a function which raises an error for some cases | |
def sum(a,b) | |
if a < 0 || b < 0 | |
raise ArgumentError, "both arguments must be greater than zero" | |
end | |
a + b | |
end |
# 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 | |
} |
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=",,,,," |
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 |
# 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 |
uri_decode () { | |
ruby -e "require 'uri'; puts URI.decode '$1'" | |
} | |
uri_encode () { | |
ruby -e "require 'uri'; puts URI.encode '$1'" | |
} |
[alias] | |
st = status | |
ca = commit -am | |
co = checkout | |
branch-name = !git branch 2>/dev/null | grep -e ^* | tr -d '* ' | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
compare = !"open https://github.com/soundcloud/`echo ${PWD##*/}`/compare/`git branch-name`" | |
implode = !"BN=`git branch-name` && [ $BN != 'master' ] && git co master && git branch -D $BN && git push origin :$BN" | |
un = !git status --porcelain | grep '??' | awk '{ print $2}' | |
corb = !git checkout -t |
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 |