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
--- src/http/ngx_http_variables.c.orig 2010-01-11 03:21:46.000000000 -0800 | |
+++ src/http/ngx_http_variables.c 2010-02-18 10:01:32.000000000 -0800 | |
@@ -93,6 +93,9 @@ | |
static ngx_int_t ngx_http_variable_pid(ngx_http_request_t *r, | |
ngx_http_variable_value_t *v, uintptr_t data); | |
+static ngx_int_t ngx_http_variable_start_time(ngx_http_request_t *r, | |
+ ngx_http_variable_value_t *v, uintptr_t data); | |
+ | |
/* |
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
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776 | |
$ cd /usr/src | |
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz | |
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz | |
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz | |
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz | |
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz |
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
# Run me with: | |
# | |
# $ nginx -p /path/to/this/file/ -c nginx.conf | |
# | |
# All requests are then routed to authenticated user's index, so | |
# | |
# GET http://user:password@localhost:8080/_search?q=* | |
# | |
# is rewritten to: | |
# |
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
Upgrading to homebrew postgresql 9.1.1 from 9.0.x | |
* Copy the old data | |
mv -R /usr/local/var/postgres/ /usr/local/var/postgres-901 | |
* Create a new database using 9.1.1 | |
/usr/local/Cellar/postgresql/9.1.1/bin/initdb /usr/local/var/postgres |
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 adds a request header so NewRelic knows when the middleware stack | |
# started processing. Hopefully this means we'll get better metrics, split | |
# between actual request queueing and time spent in the middlewares. | |
module Plex | |
class MiddlewareStart | |
def initialize(app) | |
@app = app | |
end | |
def call(env) |
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 Neocities' Rainbows! config file. We are using this in production to run all our web apps. | |
# It works really well for us and has been heavily load tested, so I wanted to share it with the community. | |
# | |
# In my opinion, this is the best way to deploy a ruby web application. Unlike EventMachine based solutions, | |
# it uses real ruby threads, which allows it to take advantage of the internal non-blocking IO pattern | |
# in MRI. | |
# | |
# Contrary to popular belief, MRI doesn't block execution to wait on IO when you are using threads, even | |
# with the GIL. The requests are done concurrently for anything that is based on the IO class. This | |
# includes things like Net::HTTP and even `system commands`. Grep the MRI Ruby source code for |
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 | |
# | |
# This script needs "fpm". If you dont have it, | |
# run "gem install fpm" | |
# | |
# You also need to "apt-get install python-setuptools" (otherwise fpm fails) | |
clean() { | |
rm -rf whisper-0.9.9 carbon-0.9.9 graphite-web-0.9.9 |
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 perl | |
# Parameters supported: | |
# | |
# config | |
# autoconf | |
# | |
# Magic markers: | |
#%# family=auto | |
#%# capabilities=autoconf |
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 Instruments | |
def self.set_logger(l, m) | |
@logger = l | |
@method = m | |
end | |
def self.logger | |
@logger | |
end |
OlderNewer