Skip to content

Instantly share code, notes, and snippets.

View rabellamy's full-sized avatar

Robert Anthony Bellamy rabellamy

View GitHub Profile
func equal(x, y map[string] int) bool {
if len(x) != len(y) {
return false
}
for k, xv := range x {
if yv, ok := y[k]; !ok || yv != xv {
return false
}
@rabellamy
rabellamy / kube.sh
Last active December 19, 2016 04:27
for host in $KUBERNETES_HOSTS;
set PUBLIC_IP_ADDRESS (aws ec2 describe-instances \
--filters "Name=tag:Name,Values=$host" | \
jq -r '.Reservations[].Instances[].PublicIpAddress')
scp ca.pem kubernetes-key.pem kubernetes.pem \
ubuntu@$PUBLIC_IP_ADDRESS:~/
end
package main
import (
"bufio"
"fmt"
"math"
"os"
"strconv"
)
@rabellamy
rabellamy / git-fork-sync
Last active June 24, 2016 19:23 — forked from ianmariano/git-fork-sync
Syncs your repo fork with the upstream integration and then pushes the synced integration to origin. Presumes you have an 'upstream' remote which is from whence your fork was created. Put on your path and chmod a+x it then do: git fork-sync
#!/bin/bash
VERSION="20150504"
usage() {
cat << __EOF
$0 usage:
$0 [options]
# vim:ft=zsh ts=2 sw=2 sts=2
#
# Bellamy's Theme bases on agnoster's Theme - https://gist.github.com/3712874 plus a new line.
# Idea taken from http://thisismecoding.com/multine-agnoster-oh-my-zsh/.
#
# A Powerline-inspired theme for ZSH
#
##############################################################################################
---
# `vagrant_box` can also be set to geerlingguy/centos6, geerlingguy/centos7,
# geerlingguy/ubuntu1604, geerlingguy/ubuntu1204, parallels/ubuntu-14.04, etc.
vagrant_box: geerlingguy/ubuntu1404
vagrant_user: vagrant
vagrant_synced_folder_default_type: nfs
# If you need to run multiple instances of Drupal VM, set a unique hostname,
# machine name, and IP address for each instance.
vagrant_hostname: drupalvm.dev
[DEPRECATION WARNING]: Using bare variables is deprecated. Update your
playbooks so that the environment value uses the full variable syntax
('{{common_apt_packages}}').
This feature will be removed in a future release.
Deprecation warnings can be disabled by setting deprecation_warnings=False in
ansible.cfg.