gem 'remote_syslog_logger'
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
module Spawner | |
class SpawnedJob < EventMachine::Connection | |
def initialize(params) | |
@output = "" | |
@dfr = params[:deferrable] | |
super | |
end | |
def notify_readable | |
begin |
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
# See this article for how to tag processes: | |
# http://support.silverline.librato.com/kb/monitoring-tags/using-monitoring-tags | |
# | |
#### | |
# Apache config option: | |
# See: http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerRuby | |
# | |
PassengerRuby /path/to/ruby_wrapper.sh |
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
# silverline - start the Librato Silverline agent | |
# | |
# The Librato Silverline agent collects monitoring statistics | |
# from Silverlined processes, dynamically rebalances capacity | |
# based on registered SLAs and process demand, and pushes limits | |
# to managed Silverlined processes. | |
# | |
# Librato Silverline is provided as a SaaS platform, see: | |
# http://www.librato.com | |
# |
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
$ grep -i digicert /etc/pki/tls/cert.pem | |
Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Assured ID Root CA | |
Subject: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Assured ID Root CA | |
Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Global Root CA | |
Subject: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Global Root CA | |
Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert High Assurance EV Root CA | |
Subject: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert High Assurance EV Root CA |
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
/* | |
* Dumps the value of gettimeofday(), the TSC, and | |
* getrusage(RUSAGE_SELF) every two seconds while performing some fake | |
* I/O workload on a /tmp file. | |
* | |
* Build: gcc -o readtsc readtsc.c -lrt | |
*/ | |
#include <stdio.h> |
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 | |
# | |
# | |
# Cleanup EC2 EBS snapshots. | |
# | |
# Originally from: http://www.elastdream.com/2009/04/snapshots.html | |
# | |
require 'rubygems' | |
require 'right_aws' |
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
function traildir() | |
{ | |
local n=$1 dir=$2 | |
local sl tildedir homelen shifted traildir | |
local oldifs=$IFS | |
tildedir=${dir#$HOME} | |
if ! [[ "$tildedir" == "$dir" ]]; then | |
# Special break out case | |
[[ -z "$tildedir" ]] && { echo "~"; return 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
$ make libab.so | |
gcc -Wall -fPIC -fvisibility=hidden -c -o filea.o filea.c | |
gcc -Wall -fPIC -fvisibility=hidden -c -o fileb.o fileb.c | |
gcc -Wall -fPIC -fvisibility=hidden -shared -o libab.so filea.o fileb.o | |
$ strip --strip-all --discard-all libab.so | |
$ objdump -T libab.so | grep get | |
0000000000000587 g DF .text 000000000000004a Base ab_get_string |
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
/* filea.c */ | |
#include <stdio.h> | |
/* Include public API definitions. */ | |
#include "ab.h" | |
/* Function provided by fileb.c */ | |
int b_getval_super_secret(void); | |
/* Simple function internal to this file only. */ |