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 ruby | |
require 'open-uri' | |
require 'rexml/document' | |
require 'rexml/xpath' | |
url = 'http://rpm.newrelic.com/accounts.xml?include=application_health' | |
headers = {'x-license-key' => 'YOUR LICENSE KEY'} | |
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
# -*- coding: utf-8 -*- | |
# pipes.py - Command-piping syntax for generators/coroutines in Python. | |
""" | |
pipes.py - Command-piping syntax for generators/coroutines in Python. | |
Example: | |
>>> from pipes import * | |
>>> chain1 = counter(5) | adder(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
""" | |
Copyright (c) 2009, Sean Creeley | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, | |
are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright notice, |
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 | |
### 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 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
import django | |
from django.utils.translation import ugettext_lazy as _ | |
from debug_toolbar.panels import DebugPanel | |
from haystack.backends import queries | |
class HaystackDebugPanel(DebugPanel): | |
""" | |
Panel that displays the Haystack queries. | |
""" | |
name = 'Haystack' |
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
# How to echobot with XMPP, BOSH, and Strophe | |
1. Setup ejabberd(http://www.ejabberd.im/) server and setup account [email protected] | |
NOTE: localhost should be enough. If you setup something else, make sure you add it at /etc/hosts like this | |
#/etc/hosts | |
127.0.0.1 localhost.local | |
NOTE: Also download Psi(http://psi-im.org/), and make sure you can connect to your ejabberd server. | |
2. Download strophe(http://code.stanziq.com/strophe/) and place it (eg: /Users/makoto/work/sample/strophejs-1.0) |
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 fabric.api import * | |
""" | |
Base configuration | |
""" | |
env.project_name = '$(project)' | |
env.database_password = '$(db_password)' | |
env.site_media_prefix = "site_media" | |
env.admin_media_prefix = "admin_media" | |
env.newsapps_media_prefix = "na_media" |
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
var daemon = require('./daemon'); | |
var sys = require('sys'); | |
var fs = require('fs'); | |
var http = require('http'); | |
var config = { | |
lockFile: '/tmp/hellohttpd.lock' //Location of lockFile | |
}; | |
var args = process.argv; |
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
import re | |
from django.utils.text import compress_string | |
from django.utils.cache import patch_vary_headers | |
from django import http | |
try: | |
import settings | |
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS |
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 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
OlderNewer