Skip to content

Instantly share code, notes, and snippets.

require 'webrick'
PORT = 7999
server = WEBrick::HTTPServer.new(
Port: PORT,
BindAddress: '0.0.0.0',
Logger: WEBrick::Log.new('/dev/null')
)
@ljfauscett
ljfauscett / forwarded_host.php
Created October 24, 2012 17:26
Allows wordpress be accessed with via X-Forwarded-Host servername.
<?php
/*
Plugin Name: Forwarded Host Support
Description: Allows the blog to be accessed with via X-Forwarded-Host servername.
Author: blahed
Version: 0.0.1
Author URI: http://forwardhq.com/
*/
@ljfauscett
ljfauscett / nginx-site.sh
Created July 6, 2012 22:05
nginx enable/disable sites
#!/bin/bash
SITES_AVAILABLE_DIR=/etc/nginx/sites-available
SITES_ENABLED_DIR=/etc/nginx/sites-enabled
function print_usage() {
echo "nginx-site -e <site name> to enable"
echo "nginx-site -d <site name> to disable"
}