Skip to content

Instantly share code, notes, and snippets.

View vidluther's full-sized avatar

Vid Luther vidluther

View GitHub Profile
@vidluther
vidluther / web-servers.md
Created May 13, 2021 23:30 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@vidluther
vidluther / s-maintenance-mode.php
Created August 16, 2012 21:49 — forked from mjangda/s-maintenance-mode.php
Custom WordPress maintenance mode that allows super admins access to the Dashboard
<?php
add_action( 'init', 'x_maintenance_mode' );
function x_maintenance_mode() {
if ( defined( 'X_MAINTENANCE_MODE' ) && true === X_MAINTENANCE_MODE ) {
if ( is_super_admin() && is_admin() )
return;
die( 'Site is currently under maintenance' );
@vidluther
vidluther / error_page.py
Created February 16, 2012 18:57 — forked from warmwaffles/error_page.py
Add / Remove Rackpsace Loadbalancer Error Page
#!/usr/bin/python
#
# Just change the three variables below and you are all set!
# @author Matthew A. Johnston (WarmWaffles)
# your user name
API_USERNAME = "username"
# your api key
API_KEY = "api-key"
# Load balancer Region