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
# An example for an OpenID consumer using Sinatra | |
require 'rubygems' | |
require 'sinatra' | |
gem 'ruby-openid', '>=2.1.2' | |
require 'openid' | |
require 'openid/store/filesystem' | |
helpers do | |
def openid_consumer |
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 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
[solarized-dark] | |
background = #002b36 | |
foreground = #839496 | |
majorLine = #fdf6e3 | |
minorLine = #eee8d5 | |
lineColors = #268bd2,#859900,#dc322f,#d33682,#db4b16,#b58900,#2aa198,#6c71c4 | |
fontName = Sans | |
fontSize = 10 | |
fontBold = False | |
fontItalic = False |
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
#!/etc/init/carbon-cache.conf | |
description "Carbon server" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
umask 022 | |
expect fork | |
respawn |
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 python | |
"""Split large file into multiple pieces for upload to S3. | |
S3 only supports 5Gb files for uploading directly, so for larger CloudBioLinux | |
box images we need to use boto's multipart file support. | |
This parallelizes the task over available cores using multiprocessing. | |
Usage: | |
s3_multipart_upload.py <file_to_transfer> <bucket_name> [<s3_key_name>] |
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/ruby | |
# | |
# A script to check Amazon Webservice's Health Status Dashboard | |
# | |
# Jens Braeuer, github.com/jbraeuer | |
# | |
# Version 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
ruby-1.8.7-p352 $ irb | |
1.8.7 :001 > thing = 'sometext' | |
=> "sometext" | |
1.8.7 :002 > thing.grep(/some/) | |
=> ["sometext"] | |
ruby-1.9.2-p290 $ irb | |
1.9.2p290 :001 > thing = 'sometext' | |
=> "sometext" | |
1.9.2p290 :002 > thing.grep(/some/) |
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 "site config" for nginx | |
upstream django { | |
# Distribute requests to servers based on client IP. This keeps load | |
# balancing fair but consistent per-client. In this instance we're | |
# only using one uWGSI worker anyway. | |
ip_hash; | |
server unix:/tmp/uwsgi.sock; | |
} | |
server { |
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 connection = require('amqp').createConnection({host: 'localhost'}); | |
connection.on('ready', function() { | |
// create a temporary queue by passing an empty string as the queue name | |
var queue = connection.queue('', function(queue) { | |
console.log('connected to ' + queue.name); | |
// bind the queue to all messages on the amq.rabbitmq.log topic exchange | |
queue.bind('amq.rabbitmq.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
"""Decorator to quickly add statsd (graphite) instrumentation to Celery | |
task functions. | |
With some slight modification, this could be used to instrument just | |
about any (non-celery) function and be made abstract enough to customize | |
metric names, etc. | |
Stats reported include number of times the task was accepted by a worker | |
(`started`), the number of successes, and the number of times the task | |
raised an exception. In addition, it also reports how long the task took |
OlderNewer