Skip to content

Instantly share code, notes, and snippets.

View brandocorp's full-sized avatar

Brandon Raabe brandocorp

View GitHub Profile
@brandocorp
brandocorp / openvpn-ssh-fix.sh
Created July 1, 2016 05:26
OpenVPN SSH Fix
#!/bin/sh
# NOTE: I pieced this together from my shell history. I haven't fully tested it...
LAN_ADDR='10.0.1.1'
LAN_CIDR='10.0.0.0/16'
LAN_GTWY='10.0.0.1'
DEV_BRDG='lan0'
DEV_PHYS='eno1'
# Setup a DHCP reservation on your router for the client machine with address 10.0.1.1
@brandocorp
brandocorp / ubuntu-locales.sh
Last active May 23, 2016 16:54
ubuntu-locales
#!/bin/sh
sudo locale-gen en_US en_US.UTF-8
dpkg-reconfigure locales
@brandocorp
brandocorp / _terminal.txt
Created January 20, 2016 00:44
brunch_build_failure
[brandocorp:~/git/brandocorp] % mix phoenix.new phoenix_blog
* creating phoenix_blog/config/config.exs
* creating phoenix_blog/config/dev.exs
* creating phoenix_blog/config/prod.exs
* creating phoenix_blog/config/prod.secret.exs
* creating phoenix_blog/config/test.exs
* creating phoenix_blog/lib/phoenix_blog.ex
* creating phoenix_blog/lib/phoenix_blog/endpoint.ex
* creating phoenix_blog/test/views/error_view_test.exs
* creating phoenix_blog/test/support/conn_case.ex
@brandocorp
brandocorp / _KITCHEN_RAKE.md
Created December 17, 2015 18:04
Test Kitchen Rake Tasks

Specific machines

desc 'Run integration tests'
task :integration do
  Kitchen.logger = Kitchen.default_file_logger
  Kitchen::Config.new.instances.get_all(/ubuntu/).tap do |instances| 
    instances.each {|instance| instance.test(:always) }
  end
end
@brandocorp
brandocorp / _README.md
Last active December 12, 2015 23:17
Chef Build DSL

Example Build DSL

# maven builds
mvn 'description' do
  version '3.3.9'
  java '1.8.0'
  binary '/usr/local/bin/mvn'

  options do
@brandocorp
brandocorp / brewtstrap.sh
Last active November 19, 2015 15:50
Bootstrap OSX with Brew
#!/bin/bash
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install caskroom/cask/brew-cask
brew cask install chefdk
sudo chown -R $(whoami): /opt
chef-client -z -o 'workstation::setup'
@brandocorp
brandocorp / srelay.rb
Last active November 4, 2015 02:44
srelay formula
require "formula"
class Srelay < Formula
homepage "http://socks-relay.sourceforge.net"
url "https://downloads.sourceforge.net/project/socks-relay/socks-relay/srelay-0.4.8/srelay-0.4.8b6.tar.gz"
sha1 "f5002394c9447bda340831ddabf339e88eab9f24"
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
@brandocorp
brandocorp / counting.cpp
Last active October 19, 2015 01:39
counting.cpp
#include <iostream>
using namespace std;
int countingArray(float list[], int arraySize, bool countNegative);
void countingArray(float list[], int arraySize, int &numOfNegatives, int &numOfPositives);
int main() {
const int arraySize = 7;
@brandocorp
brandocorp / hw.cpp
Last active September 18, 2015 16:37
#include <iostream>
#include <string>
using namespace std;
int main()
{
int quantity;
double total;
@brandocorp
brandocorp / k8s-docker.yml
Last active April 19, 2016 20:45
k8s-docker.yml
k8s_docker:
image: rancher/os-docker:v0.3.3
labels:
io.rancher.os.scope: system
io.rancher.os.after: console
net: host
pid: host
ipc: host
uts: host
privileged: true