Skip to content

Instantly share code, notes, and snippets.

View justinlund's full-sized avatar

Justin Lund justinlund

  • DreamHost
  • Atlanta, GA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am justinlund on github.
  • I am justinlund (https://keybase.io/justinlund) on keybase.
  • I have a public key whose fingerprint is 3960 11C4 EBC9 C45A 9B8E 1356 3437 865E B292 5CBA

To claim this, I am signing this object:

@justinlund
justinlund / ssh_config
Created April 9, 2015 21:38
DreamCompute ssh config
Host jump
HostName X.X.X.X
User dhc-user
IdentityFile ~/.ssh/id_rsa.pub
Host 10.10.10.*
ProxyCommand ssh jump -W %h:%p
User dhc-user
IdentityFile ~/.ssh/dreamcompute.pem
@justinlund
justinlund / gist:b604386c13f086a06f26
Created February 20, 2015 22:13
Using Apache LibCloud to launch a DreamCompute subsonic Ubuntu 14.04 instance
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
OpenStack = get_driver(Provider.OPENSTACK)
driver = OpenStack('username', 'password',
ex_force_auth_url='https://keystone.dream.io/v2.0/tokens',
ex_force_auth_version='2.0_password',
ex_tenant_name='dhc12345678')
sizes = driver.list_sizes()
@justinlund
justinlund / dhdo_download.sh
Created February 20, 2015 22:09
Quick script to demonstrate authenticating a request to download a private object from DreamObjects
#! /usr/bin/env bash
# Basic shell script to download a private object
# from DreamHost DreamObjects
file=$1
bucket="My_Bucket"
resource="/${bucket}/${file}"
dateValue=`date -Ru`
stringToSign="GET\n\n\n${dateValue}\n${resource}"
echo ${stringToSign}
@justinlund
justinlund / php-opencloud with DreamCompute
Created February 10, 2015 21:26
Using php-opencloud to launch a DreamCompute subsonic CentOS 6.5 instance
<?php
require 'vendor/autoload.php';
use OpenCloud\OpenStack;
$client = new OpenStack('https://keystone.dream.io/v2.0', array(
'username' => 'username',
'password' => 'password',
// Use either tenantName or tenantId