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
!/bin/sh | |
# post-commit hook that updates version using semver. | |
# this one stores versions in the form 1.0.abc123 where the last component is the (short) commit | |
SEMVER=`which semver` | |
CONFIG='config.xml' | |
if [ -s $SEMVER ]; then | |
# replace last part of the version by commit id. |
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
#!upstart | |
# upstart script for nodejs+forever | |
# ref: https://www.exratione.com/2013/02/nodejs-and-forever-as-a-service-simple-upstart-and-init-scripts-for-ubuntu/ | |
description "upstart + nodejs + forever" | |
start on startup | |
stop on shutdown |
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
curl --silent "http://weather.yahooapis.com/forecastrss?w=20070458&u=c" | grep -E '(Current Conditions:|C<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//' | |
# Note: Use YQL (eg. http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20text%3D%22New%20Delhi%22&format=json) to find WOEID (the w= param in the url). | |
# More: http://developer.yahoo.com/weather/ |