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
pid /opt/nginx/logs/nginx.pid; | |
# Run as the nginx user | |
user nginx nginx; | |
worker_processes 2; | |
error_log /opt/nginx/logs/error.log notice; | |
events { | |
worker_connections 1024; | |
use epoll; |
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
server { | |
access_log /opt/nginx/logs/test_server.access.log main buffer=32k; | |
error_log /opt/nginx/logs/test_server.error.log info; | |
expires 6h; | |
listen 2300 default rcvbuf=64k backlog=128; | |
root /opt/apps/test_server/current/public; | |
server_name test_server.com www.test_server.com; | |
passenger_enabled on; | |
} |
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
set daemon 60 | |
set logfile syslog facility log_daemon | |
set mailserver localhost | |
set mail-format { from: [email protected] } | |
set alert root@localhost | |
set httpd port 2812 and | |
allow admin:test | |
include /etc/monit.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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'rdf' | |
require 'rdf/rdfxml' | |
PROGRAMMES_URL = 'http://www.bbc.co.uk/programmes' | |
PO = RDF::Vocabulary.new("http://purl.org/ontology/po/") | |
brand_pid = 'b0081dq5' |
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
# Use Fink (if available) | |
test -r /sw/bin/init.sh && . /sw/bin/init.sh | |
# In Mac OS X, what network location is set? | |
if [ -f "/usr/sbin/scselect" ]; then | |
export LOCATION=$(/usr/sbin/scselect 2>&1 | perl -ne 'if (m/^\s+\*\s+(\S+)\s+\((.+)\)$/) { print "$2\n"; }') | |
echo "Network Location: $LOCATION" | |
fi |
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/bash | |
# if you do not have access to run the script, run "chmod 755 throttling" | |
# to run enter in terminal "./throttling [speed]" | |
# full (no throttling) | |
# fast (300Kbit) | |
# medium (100Kbit) | |
# slow (10Kbit) | |
# wwdc (1Kbit) | |
# off (blocks connection) |
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
BREW_HOME=$HOME/.homebrew | |
$ brew install libxml2 | |
$ brew link libxml2 | |
$ brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/libxslt.rb | |
$ brew link libxslt | |
$ brew install libiconv | |
$ brew link libiconv | |
$ gem install nokogiri -- --with-xml2-dir=$BREW_HOME/Cellar/libxml2/2.7.8 --with-xslt-dir=$BREW_HOME/Cellar/libxslt/1.1.26 --with-iconv-dir=$BREW_HOME/Cellar/libiconv/1.13.1/ |
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
/* | |
File: KeychainItemWrapper.h | |
Abstract: | |
Objective-C wrapper for accessing a single keychain item. | |
Version: 1.2 - ARCified | |
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple | |
Inc. ("Apple") in consideration of your agreement to the following | |
terms, and your use, installation, modification or redistribution of |
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 God | |
module Conditions | |
class RestartFileTouched < PollCondition | |
attr_accessor :restart_file | |
def initialize | |
super | |
end | |
def process_start_time | |
Time.parse(`ps -o lstart -p #{self.watch.pid} --no-heading`) |
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
web: node app.js | |
worker: node consumer.js |
OlderNewer