This file contains hidden or 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 python | |
import urllib | |
encoded_filename = urllib.quote('post.txt') | |
decoded_filename = 'post.txt.decode' | |
source = open(encoded_filename) | |
dest = open(decoded_filename, 'w') | |
decoded_data = urllib.unquote_plus(source.read()) | |
print decoded_data | |
dest.write(decoded_data) |
This file contains hidden or 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
<?php $stamp = time(); | |
$filename = '/tmp/post-'.$stamp.'.txt'; | |
file_put_contents($filename, file_get_contents('php://input')); | |
?> |
This file contains hidden or 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 | |
### BEGIN INIT INFO | |
# Provides: supervisord | |
# Required-Start: $remote_fs | |
# Required-Stop: $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
This file contains hidden or 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 | |
### BEGIN INIT INFO | |
# Provides: gunicorn | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the gunicorn server | |
# Description: starts gunicorn using start-stop-daemon |
This file contains hidden or 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
def yql_query_json(query) | |
api_query = CGI.escape(query) | |
url = "http://query.yahooapis.com/v1/public/yql?q=#{api_query}&format=json&env=http%3A%2F%2Fdatatables.org%2Falltables.env" | |
json_results = open(url) {|f| f.read} | |
results = JSON.parse(json_results) | |
end |
This file contains hidden or 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
#Simple ganglia gmetric plugin using the gmetric gem. | |
#Counts entries in a dir and reports them to the ganglia cluster using | |
#the gmetric ruby gem | |
require 'rubygems' | |
require 'gmetric' | |
#Tmax indicates freshness, if TN(seconds since metric was updated) exceeds tmax then ganglia will expect a new value | |
#Dmax indicates how long an old metric should be retained | |
#decsripitions taken from http://monami.sourceforge.net/tutorial/ar01s06.html | |
tmax = 60 |
This file contains hidden or 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
<settings> | |
<mirrors> | |
<mirror> | |
<id>Local raven mirror or proxy</id> | |
<name>corp</name> | |
<url>http://maven:8081/artifactory/repo</url> | |
<mirrorOf>central</mirrorOf> | |
</mirror> | |
</mirrors> | |
</settings> |
This file contains hidden or 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
<settings> | |
<mirrors> | |
<mirror> | |
<id>Local raven mirror or proxy</id> | |
<name>corp</name> | |
<url>http://maven:8081/artifactory/repo</url> | |
<mirrorOf>*</mirrorOf> | |
</mirror> | |
</mirrors> | |
</settings> |
NewerOlder