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/bash | |
# http://www.jarloo.com/yahoo_finance/ | |
if [ "$1" == "all" ] | |
then | |
echo $(date +'%Y%m%d %H:%M') $(curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=aapl&f=l1,c'); | |
echo $(date +'%Y%m%d %H:%M') $(curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=msft&f=l1,c'); | |
echo $(date +'%Y%m%d %H:%M') $(curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=yhoo&f=l1,c'); | |
else | |
echo $(date +'%Y%m%d %H:%M') $(curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s='+$1+'&f=l1,c'); |
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
ProxyPassMatch .+/files/(css|js)/.+ ! | |
ProxyPassMatch ^/sites/(.+)/files/(.+)$ http://www.$1/sites/$1/files/$2 |
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 use the Apple Push Notification Service, you need to download your iOS Certificate from the Apple Developer site and import them into your Mac keychain. Next step, export the private key as key.p12 and the cert as cert.p12 then run these shell commands. | |
openssl pkcs12 -clcerts -nokeys -out apns-cert.pem -in cert.p12 | |
openssl pkcs12 -nocerts -out apns-key.pem -in key.p12 | |
openssl rsa -in apns-key.pem -out apns-key-noenc.pem | |
cat apns-cert.pem apns-key-noenc.pem > apns.pem |
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/bash | |
if [ -z $acquia_dev_server ]; then | |
acquia_dev_server="dev" | |
fi | |
echo "***********************************************" | |
echo "Configuration" | |
echo "***********************************************" | |
echo "site = $site" |
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/bash | |
# https://www.goettner.net/2012/average-apache-process-memory-usage/ | |
ps aux | grep apache2 | grep -v pts | awk '{ tot += $6; procs += 1; print $2,$6,$11 } END { print "TOTAL: ",tot,"/",procs,"=",tot/procs }' |
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/bash | |
# FIRST | |
# cd to the directory where you keep your codez | |
# SECOND | |
# loop over all the directories that contain a git repo | |
find . -name '.git' -type d -prune | while read d; do | |
cd $d/.. | |
git config user.email "[email protected]" |
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
openssl req -new -newkey rsa:2048 -nodes -keyout private.key -out site_com.csr |