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
echo 'obase=16; 123999' | bc |
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
trap("SIGINT") { exit! } |
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
#!/usr/bin/env | |
# curl https://gist.github.com/mattes/7041760/raw/wp-cli-install-with-brew.sh | bash | |
brew tap homebrew/dupes | |
brew tap josegonzalez/homebrew-php | |
brew install wp-cli |
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
SCRIPT_FILENAME=/www/localhost/info.php REQUEST_METHOD=GET cgi-fcgi -bind -connect 172.17.0.163:20533 |
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
# | |
# This is the main Apache HTTP server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure |
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
dscacheutil -flushcache; sudo killall -HUP mDNSResponder; |
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
from datetime import datetime, timedelta | |
def parse_date_ranges(dates): | |
if(not dates or not len(dates) > 0): | |
return False | |
# make sure to order dates | |
dates.sort() | |
# init values |
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
brew install postgres | |
postgres -D /usr/local/var/postgres | |
createdb piecemaker2_prod | |
createdb piecemaker2_dev | |
createdb piecemaker2_test |
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
docker run -t -i -d ubuntu echo "test" | |
d0f637bfc0350729b07d6a6cd4f03140f6a0951924be86eda28f0fa9954dea23 | |
docker inspect d0f637bfc0350729b07d6a6cd4f03140f6a0951924be86eda28f0fa9954dea23 | |
[{ | |
"ID": "d0f637bfc0350729b07d6a6cd4f03140f6a0951924be86eda28f0fa9954dea23", | |
"Created": "2014-03-05T21:11:35.763549293Z", | |
"Path": "echo", | |
"Args": [ | |
"test" |
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
class InitCSVHandler(webapp2.RequestHandler): | |
def get(self): | |
fetched = self.request.get('fetched') | |
if not fetched: | |
self.response.write("no fetched date") | |
return | |
taskqueue.add(url='/create_csv', queue_name='csv', params={'fetched': fetched}) | |
self.response.write("creating " + str(fetched)) |