Skip to content

Instantly share code, notes, and snippets.

View Cloudxtreme's full-sized avatar

Kevin Hatfield Cloudxtreme

  • CloudCDN
View GitHub Profile
<?php
/**
* Order a new SoftLayer IP subnet
*
* Build a SoftLayer_Container_Product_Order_Network_Subnet object for a new
* IP subnet order and pass it to the SoftLayer_Product_Order API service to
* order it. See below for more details.
*
* This assumes the SoftLayer API PHP client
* <http://github.com/softlayer/softlayer-api-php-client> is installed in the
<?php
/**
* Retrieve graphs for specific metrics for a single server.
*
* This example shows how to use the SoftLayer API to retrieve graphs for the
* specific Advanced Monitoring metrics for a single hardware or virtual guest
* server instance.
*
* We will call the SoftLayer API to retrieve the monitoring agents,
* configuration template, and configuration values for a server instance.
@softlayer
softlayer / gist:1006343
Created June 3, 2011 13:30
CCI order with IP questionnaire
<?php
require_once dirname(__FILE__) . '/SoftLayer/SoapClient.class.php';
/**
* Your SoftLayer API username.
*
* @var string
*/
$apiUsername = 'API_USERNAME';
@evotopid
evotopid / README.md
Created September 19, 2011 13:43
Chromium Updater - Mac OS X

Information

This is an updater script for the open source Web browser Chromium for the people (probably mostly developers) who want to stay on the bleeding edge version of Chromium.

It's made for Mac OS X. It downloads a copy from the build server and unpacks it to the right destination. You should shut down Chromium before running this, because it could lead to various problems if you don't.

@saetia
saetia / gist:1623487
Last active December 1, 2025 21:36
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@andrewschoen
andrewschoen / S3 bucket sync
Created February 3, 2012 21:22
Python script to sync an S3 bucket to the local file system
# -*- coding: utf-8 -*-
import os
import StringIO
import hashlib
try:
from boto.s3.connection import S3Connection
from boto.s3.key import Key
except ImportError:
raise ImproperlyConfigured, "Could not load Boto's S3 bindings."
# So we can talk to the SoftLayer API:
import SoftLayer.API
import argparse
# Your SoftLayer API username and key.
#
# Generate an API key at the SoftLayer Customer Portal:
# https://manage.softlayer.com/Administrative/apiKeychain
apiUsername = ''
apiKey = ''
@softlayer
softlayer / gist:2158553
Created March 22, 2012 14:10
Firewall rule creation command line tool
import SoftLayer.API
import ipaddr
def splitIpCidrNotation(arg):
ipv4 = ipaddr.IPv4Network(arg)
return str(ipv4.ip), str(ipv4.netmask)
def getClients(user, key):
@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 = '';
@softlayer
softlayer / gist:2998759
Created June 26, 2012 20:36
Update DNS Zone
<?php
require_once('SoftLayer/SoapClient.class.php');
function updateDns() {
$apiUsername = 'USER HERE';
$apiKey = 'KEY HERE';
$domainId = 'DOMAIN ID HERE';
$dnsClient = SoftLayer_SoapClient::getClient('SoftLayer_Dns_Domain', $domainId, $apiUsername, $apiKey);
$recordClient = SoftLayer_SoapClient::getClient('SoftLayer_Dns_Domain_ResourceRecord', null , $apiUsername, $apiKey);