Credit to: https://gist.github.com/lucasfais/1207002
go to file | ⌘T
go to project | ⌘⌃P
go to methods | ⌘R
go to line | ⌃G
ember-movies master$ git push heroku master | |
Counting objects: 384, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (346/346), done. | |
Writing objects: 100% (384/384), 728.08 KiB | 329 KiB/s, done. | |
Total 384 (delta 150), reused 0 (delta 0) | |
-----> Fetching custom git buildpack... done | |
-----> Lineman app detected |
Credit to: https://gist.github.com/lucasfais/1207002
go to file | ⌘T
go to project | ⌘⌃P
go to methods | ⌘R
go to line | ⌃G
gd
jumps to the definition of a type, variableC-t
jumps you back to where you where.<tab>
to autocomplete snippets in insert mode. Example snippets.:A
open alternate (i.e. test for current file). Also :AH
and :AV
for horizontal and vertical splits.gt
will run the tests for the current file.:GoDeclsDir
will show all functions in current directory.K
open GoDoc for symbol under the cursor.<leader>i
over a function or method name will show function information.c
will run GoCoverage for the current file.# For advice on how to change settings please see | |
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html | |
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the | |
# *** default location during install, and will be replaced if you | |
# *** upgrade to a newer version of MySQL. | |
[mysqld] | |
# Remove leading # and set to the amount of RAM for the most important data | |
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. |
rvm 1.9.3-p327; rvm gemset use ciaran_gemset |
redis_client.set('ciaran_key', [:hi, :there].to_json) | |
>> OK | |
JSON.parse(redis_client.get('ciaran_key')) | |
>> ["hi", "there"] | |
redis_client.del('ciaran_key') | |
>> 1 |
# http://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |
def stub_save!(obj) | |
obj.stub(:save!).and_return true if obj.respond_to? :save! | |
end |
# create list of hosts | |
cat content_vhosts.conf | grep ServerName | awk '{ print $2 }' | sort >> sorted_hosts.txt | |
# health check for each | |
# use cntlm proxy, max op time of 5s | |
for host in `cat sorted_hosts.txt` | |
do | |
curl -sLk -x http://localhost:3128 -m 5 -w "$host : %{url_effective} %{http_code} in %{num_redirects} redirs\\n" $host -o /dev/null | |
done |