Skip to content

Instantly share code, notes, and snippets.

View cloudartisan's full-sized avatar

David Taylor cloudartisan

View GitHub Profile
git config user.email $EMAIL
git config user.name $USERNAME
git config user.signingkey $KEY
git config commit.gpgsign true
git config push.gpgsign if-asked
git config gpg.program $(which gpg)
@cloudartisan
cloudartisan / linode_speedtest.sh
Last active August 26, 2018 10:42
Linode speed tests
#!/bin/bash
for facility in newark atlanta dallas fremont frankfurt london singapore tokyo2
do
time wget --output-document=/dev/null speedtest.${facility}.linode.com/100MB-${facility}.bin
done
@cloudartisan
cloudartisan / gist:a38b36c403ea40c7a6b5f7596c1d3ed8
Created August 26, 2018 07:54
Using "go get" with GitHub HTTPS and a personal access token
# generate a personal access token, grant it repo access, and use the following
git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"
@cloudartisan
cloudartisan / nodes.pp
Created July 5, 2012 05:26
Want to define a different security group for each server range
node /^tcsearch(0[1-9]|10)\.deskstaging\.com$/ inherits staging {
include elasticsearch
}
node /^tcsearch2[0-9]\.deskstaging\.com$/ inherits staging {
include elasticsearch
}
@cloudartisan
cloudartisan / Capfile
Created June 21, 2011 08:33
Basis for pushing/installing/updating Puppet using Capistrano (via rodjek)
require 'rubygems'
require 'railsless-deploy'
set :application, "puppet"
set :use_sudo, true
set :deploy_to, "/var/assistly/puppet/git"
set :keep_releases, 2
set :scm, "git"
set :repository, "git+ssh://git@github-puppet/github/puppet.git"
set :local_repository, "git+ssh://git@github.com/github/puppet.git"
@cloudartisan
cloudartisan / Launching cluster fails
Created June 20, 2011 07:59
Pallet + EC2 == too hard :-(
$ lein pallet converge staging.core/mongodb-cluster 1
WARN implementation - pallet.compute.vmfest provider failed to load: java.io.FileNotFoundException: Could not locate vmfest/virtualbox/virtualbox__init.class or vmfest/virtualbox/virtualbox.clj on classpath: (vmfest.clj:1)
INFO core - retrieving nodes
ERROR main - Exception
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
at clojure.lang.LazySeq.sval(LazySeq.java:47)
at clojure.lang.LazySeq.seq(LazySeq.java:56)
at clojure.lang.RT.seq(RT.java:450)
at clojure.core$seq.invoke(core.clj:122)
@cloudartisan
cloudartisan / core.clj
Created June 17, 2011 04:11
Pallet source for deployment to staging
(ns staging.core
(:require
[pallet.core :as core]
[pallet.compute :as compute]
[pallet.resource :as resource]
[pallet.stevedore :as stevedore]
[pallet.crate.automated-admin-user :as automated-admin-user]
[staging.crate.mongodb :as mongodb]))
(def ec2-service
@cloudartisan
cloudartisan / gist:1030686
Created June 17, 2011 01:25
Pallet/jClouds credential problems
WARN implementation - pallet.compute.vmfest provider failed to load: java.io.FileNotFoundException: Could not locate vmfest/virtualbox/virtualbox__init.class or vmfest/virtualbox/virtualbox.clj on classpath: (vmfest.clj:1)
WARN deprecate - DEPRECATED [staging/core.clj:25] pallet.core/defnode is deprecated. See group-spec, server-spec and node-spec in pallet.core
WARN deprecate - DEPRECATED [staging/core.clj:41] pallet.resource/phase is deprecated, use pallet.phase/phase-fn
WARN deprecate - DEPRECATED [staging/core.clj:42] pallet.resource/phase is deprecated, use pallet.phase/phase-fn
WARN deprecate - DEPRECATED [Compiler.java:2906] pallet.core/make-node is deprecated. See group-spec, server-spec and node-spec in pallet.core.
INFO core - retrieving nodes
INFO core - converging nodes
INFO core - adjust-node-count :mongodb 1
INFO core - Starting 1 nodes for :mongodb os-family :ubuntu
INFO jclouds - building node template for :mongodb