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
TODO: | |
- edit /opt/statsd/local.js | |
- correct the graphite host to localhost | |
- if desired, put 'debug: true' in there | |
- make the box accessible via the hostname 'graphite' | |
- update conf/storage-schemas.conf, see example for these retention rules: | |
6 hours of 10 second data | |
1 week of 1 minute data | |
5 years of 10 minute data |
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
@Grab(group='commons-net', module='commons-net', version='2.0') | |
import org.apache.commons.net.ftp.FTPClient | |
println("About to connect...."); | |
new FTPClient().with { | |
connect "some-server.some-domain.com" | |
enterLocalPassiveMode() | |
login "your-username", "your-password" | |
changeWorkingDirectory "/var/appl/some/remote/dir/" | |
def incomingFile = new File("some-file-to-retrieve.log") |
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
find . -name "*pyc" -exec git rm -f {} \; |
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
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
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
""" | |
Example code for sending emails using boto's SES module. Its main purpose is to | |
show how easy it is to build multipart text/html emails. | |
Unfortunately, at this time Amazon's SES doesn't seem to allow you to add | |
attachments to messages, but if it does in the future it would probably look | |
like the code that I've commented out below the exception. | |
The SES module of the Boto package isn't quite finalized yet, but I currently | |
have this code running using Harry Marr's implementation which is available at: |
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 actual file that combines all of the other snippets | |
# I've been using it for a while, so it's officially Bug Free (TM) | |
# Python startup script. vim: set ft=python : | |
# from http://www.norvig.com/python-iaq.html | |
# also see Tarek Ziade's _Expert_Pythom_Programming_ page 19 | |
import os, sys | |
# Coloured prompt | |
if os.getenv('TERM') in ('xterm', 'vt100', 'rxvt', 'Eterm', 'putty'): |
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
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
NewerOlder