Skip to content

Instantly share code, notes, and snippets.

View ukd1's full-sized avatar

Russell Smith ukd1

View GitHub Profile
@softlayer
softlayer / gist:2789898
Created May 25, 2012 19:03
OSreload multiple servers by IP
<?php
require_once('SoftLayer/SoapClient.class.php');
/**
* Set your SoftLayer API username and key.
*/
$apiUsername = '';
$apiKey = '';
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
# This script will generate the commands used to preshard a collection
# in mongodb.
#
# See:
# http://www.mongodb.org/display/DOCS/Splitting+Chunks
Index: sapi/cli/config.w32
===================================================================
--- sapi/cli/config.w32 (revision 308839)
+++ sapi/cli/config.w32 (working copy)
@@ -6,7 +6,8 @@
ARG_ENABLE('cli-win32', 'Build console-less CLI version of PHP', 'no');
if (PHP_CLI == "yes") {
- SAPI('cli', 'php_cli.c', 'php.exe');
+ SAPI('cli', 'php_cli.c php_http_parser.c php_cli_server.c', 'php.exe');
@ukd1
ukd1 / truncate.php
Created November 29, 2010 20:38
Allows deleting of all keys in a riak bucket using the streaming api
<?php
/**
* Delete all keys from a riak bucket using key streaming
*
* History:
*
* 29-Nov-10
* First version
*
* @author Russell Smith <russell.smith@ukd1.co.uk>
@samuel
samuel / backup.py
Created November 8, 2010 22:42
A script to automate freezing XFS and locking MongoDB and snapshotting EBS volumes
#!/usr/bin/env python
from __future__ import with_statement
import contextlib
import logging
import os
import sys
import urllib2
from boto.ec2.connection import EC2Connection