This file contains 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
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist |
This file contains 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
git rev-parse: RefName ======> SHA1 | |
git name-rev: SHA1 <===== RefName | |
# Convert the reference name HEAD to its corresponding SHA1 | |
git rev-parse HEAD # Assuming for the sake of example that it outputs 1234567 | |
# Convert the SHA1 (1234567) into its reference name (should output HEAD in our example) | |
git name-rev 1234567 | |
# or else |
This file contains 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
#server.modules += ( "mod_rewrite") | |
# Workaround to have a working reverse-proxy that matches an URL does URL rewriting in Ligghtpd. | |
# | |
# Ligtthpd 1.4.28 cannot perform both matching and URL rewriting at the same time. | |
# Therefore we need to define 2 proxies, one does the matching and bounce the request | |
# to the other one, in charge of rewriting the URL before proxying the request to the target server. | |
# | |
# More about this here: | |
# http://redmine.lighttpd.net/issues/164#note-9 |
This file contains 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
# | |
# To check from where a maven dependency comes from | |
# | |
mvn dependency:tree -Dincludes=groupId:artifactId |
This file contains 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
publicString formatDateAsUTC(Date date) { | |
Calendar calendar = Calendar.getInstance(); | |
calendar.setTime(date); | |
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss'Z'"); | |
sdf.setTimeZone(TimeZone.getTimeZone("UTC")); | |
return sdf.format(date); | |
} |
This file contains 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
-- reset sequence to the max value of its ids | |
SELECT setval('public.mytable_id_seq', (SELECT MAX(id) FROM mytable)); | |
-- get the last value of a sequence | |
SELECT last_value FROM mytable_id_seq; |
This file contains 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
Cherry pick the commits from a through z (assuming SHA1 a is older than z) | |
git rev-list --reverse --topo-order a^..z | xargs -n 1 git cherry-pick | |
The below code does not work as it will squash all the commits (a..z) in a single one. | |
git cherry-pick a..z |
This file contains 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
/* Solarized Dark | |
For use with Jekyll and Pygments | |
http://ethanschoonover.com/solarized | |
SOLARIZED HEX ROLE | |
--------- -------- ------------------------------------------ | |
base03 #002b36 background | |
base01 #586e75 comments / secondary content |
This file contains 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
git name-rev --name-only $(git rev-parse HEAD) |
NewerOlder