Skip to content

Instantly share code, notes, and snippets.

View greyhoundforty's full-sized avatar
🏠
Working from home

Ryan Tiffany greyhoundforty

🏠
Working from home
View GitHub Profile

ssh -R 19999:localhost:22 ryan@x.x.x.x -p xx

ssh localhost -p 19999

@greyhoundforty
greyhoundforty / gist:5df2f9a65bae3d4b029c
Created August 31, 2015 00:32
Softlayer eth0 Ubuntu
# eth0
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 10.x.x.x
netmask 255.255.255.x
post-up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.x.x.x
@greyhoundforty
greyhoundforty / cloud-config.yml
Created October 7, 2015 17:42
cloud-config.yml
#cloud-config
coreos:
etcd2:
discovery: https://discovery.etcd.io/<token>
advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
initial-advertise-peer-urls: http://$private_ipv4:2380
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
listen-peer-urls: http://$private_ipv4:2380
units:
@greyhoundforty
greyhoundforty / do.tf
Created December 2, 2015 17:24
Digital Ocean Terraform file
variable "do_token" {}
variable "ssh_keys" {}
variable "key_file" {}
variable "size" {
default = "1gb"
}
variable "dnsimple_email" {}
variable "dnsimple_token" {}
@greyhoundforty
greyhoundforty / sl.tf
Created December 2, 2015 20:39
SoftLayer Terraform example
variable "sl_user" {}
variable "sl_key" {}
variable "dnsimple_email" {}
variable "dnsimple_token" {}
provider "softlayer" {
username = "${var.sl_user}"
api_key = "${var.sl_key}"
}
@greyhoundforty
greyhoundforty / login.md
Created December 8, 2015 19:46
Login and Navigation

If you are logging in as root you will be dropped in to the /root directory. If you are logging in as a non-root user you will likely be logged in to /home/.

$ ssh root@10.0.0.2
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)

$ pwd
/home/vagrant
@greyhoundforty
greyhoundforty / monday_morning.sh
Created December 29, 2015 20:01
Monday morning taskpaper setup
#!/usr/bin/env bash
dt=$(date -v -7d +"%m-%d-%y")
function archive() {
cd "$HOME/Dropbox/Listacular/"
mv "$HOME/Dropbox/Listacular/weeklyschedule.taskpaper" "$HOME/Dropbox/Listacular/Archive/$dt_weeklyschedule.taskpaper"
}
function writefile() {
@greyhoundforty
greyhoundforty / nextbill.md
Created December 30, 2015 14:43
How do I find out what my next bill will be?
@greyhoundforty
greyhoundforty / billing_rest.md
Created December 30, 2015 14:51
Billing API REST Examples

Before we begin I find it helpful to set some environment variables so that we don't have to provide our SoftLayer user and API key in every call. In your terminal run the following, substituting in your Portal username and API key:

export SOFTLAYER_USERNAME=<username>
export SOFTLAYER_API_KEY=<apikey>

How do I find out what my next bill will be?

@greyhoundforty
greyhoundforty / log_taskpaper_dayone.sh
Created December 30, 2015 20:42
Log @done taskpaper tasks to Day One and, archive the completed tasks and clear the archive
#!/usr/bin/env bash
grep '@done' ~/Dropbox/Listacular/weeklyschedule.taskpaper|tr -d \"\\t\" |/usr/local/bin/dayone new
/usr/bin/osascript ~/Library/Scripts/Applications/TaskPaper/move_to_archive.scpt
/usr/bin/osascript ~/Library/Scripts/Applications/TaskPaper/clear_archive.scpt