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
tail -F /var/log/nginx/blog.foo.bar-access.log& | |
curl --head http://blog.foo.bar:81 | |
"HEAD / HTTP/1.1" 200 0 "-" "-" "HIT" | |
HTTP/1.1 200 OK | |
Server: nginx/0.7.67 | |
Date: Mon, 17 Jan 2011 22:51:44 GMT | |
Content-Type: text/html; charset=UTF-8 | |
Connection: keep-alive |
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
upstream wordpress { | |
server 127.0.0.1:80 weight=1 fail_timeout=120s; | |
} | |
server { | |
listen 81; | |
server_name blog.foo.bar; | |
proxy_cache_valid 200 20m; | |
access_log /var/log/httpd/nginx-access.log combined; |
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
http { | |
... | |
#caching related | |
client_body_temp_path /var/lib/nginx/body 1 2; | |
gzip_buffers 32 8k; | |
gzip on; | |
tcp_nodelay on; | |
gzip_types | |
text/html |
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 | |
#(for apxs) | |
yum install -y httpd-devel | |
cd /usr/local/src/ | |
sudo wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz | |
sudo tar xzf mod_rpaf-0.6.tar.gz | |
cd mod_rpaf-0.6 | |
sudo apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c | |
#Make sure you have keepalive off in httpd.conf |
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
upstream serviceA { | |
server 127.0.0.1:88; | |
server 127.0.0.1:88; | |
} | |
upstream serviceB { | |
server 127.0.0.1:89; | |
server 127.0.0.1:89; | |
} | |
upstream serviceC { | |
server 127.0.0.1:90; |
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
Listen localhost:88 | |
<VirtualHost localhost:88> | |
DocumentRoot /var/www/A | |
<Directory "/var/www/A/"> | |
ErrorDocument 404 / | |
AddDefaultCharset UTF-8 | |
Options FollowSymLinks MultiViews Includes | |
AllowOverride All | |
</Directory> | |
</VirtualHost> |
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
IP_ADDRESS=`curl http://labs.rassemblr.com/go/ip` | |
USERNAME=<yourusername> | |
PASSWORD=<yourpassword> | |
HOST=<yourAhost> | |
curl -u $USERNAME:$PASSWORD / | |
"http://api.geoscaling.com/dns2/dynamic/?host=$HOST&content=$IP_ADDRESS" |
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 | |
require "cgi" | |
cgi = CGI.new("html3") | |
cgi.out() do | |
ENV['REMOTE_ADDR'] | |
end |
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
// Uses a very very simple tropo script configured for your application | |
// See http://github.com/pdeschen/nubot-labs/raw/master/tropo/src/Sms.groovy | |
HttpClient mHttpClient = new HttpClient(); | |
String mBaseUrl = "http://api.tropo.com/1.0/sessions"; | |
GetMethod method = new GetMethod(); | |
// here we have to throttle. We can't have more then x sms/minutes. |
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
event = prompt(text, [ | |
repeat:3, | |
timeout:7, | |
choices:listOptions( contacts ), | |
onEvent: | |
{ handlingEvent-> | |
handlingEvent.onTimeout( { | |
say( "I'm sorry, I didn't hear anything." ) | |
} | |
) |