Skip to content

Instantly share code, notes, and snippets.

View brianbianco's full-sized avatar

Brian Bianco brianbianco

View GitHub Profile
#The old ifupdown config
# eth1_out was simply a routing table I added previously with the int value of 200
cat << ENIINTERFACE >> /etc/network/interfaces.d/eth1.cfg
# The ENI interface
auto eth1
iface eth1 inet static
address 172.16.19.254
netmask 255.255.252.0
up ip route add default via 172.16.16.1 dev eth1 table eth1_out
@brianbianco
brianbianco / stdout-log-160.patch
Last active November 12, 2019 14:33
All standard logging lines sent to stdout
diff --git a/src/applutil.cpp b/src/applutil.cpp
index 56cac57..bccf39e 100644
--- a/src/applutil.cpp
+++ b/src/applutil.cpp
@@ -568,6 +568,8 @@ std::string proxy_log::filename(int index)
void proxy_log::add( const std::string &_value )
{
if (_value.empty()) return; // Don't bother with empty log lines.
+ COUT(_value)
+/*
@brianbianco
brianbianco / gist:46af6e2281961f7ba794
Last active August 29, 2015 14:11
Balanced String?
module BalancedString
OPENERS = ['(','[','{']
CLOSERS = [')',']','}']
def self.matching_pair?(opener,closer)
OPENERS.index(opener) == CLOSERS.index(closer)
end
def self.is_balanced?(string)
mystack = Array.new
@brianbianco
brianbianco / gist:cb8a9f73a39ed1f42934
Created October 13, 2014 20:36
Shared volumes OS X / Docker
  $ cd ~/.boot2docker
  $ curl http://static.dockerfiles.io/boot2docker-v1.2.0-virtualbox-guest-additions-v4.3.14.iso > boot2docker.iso
  $ boot2docker init
  $ VBoxManage sharedfolder add boot2docker-vm -name home -hostpath /Users
  $ boot2docker up
 
  $ boot2docker ssh "sudo modprobe vboxsf && mkdir -v -p /Users && sudo mount -v -t vboxsf  -o uid=0,gid=0 home /Users"
### Keybase proof
I hereby claim:
* I am brianbianco on github.
* I am brianbianco (https://keybase.io/brianbianco) on keybase.
* I have a public key whose fingerprint is 203E F983 2F55 AE80 4544 3194 D4F4 AD70 3148 0496
To claim this, I am signing this object:
# TrueCrypt 7.1 is incompatible with Homebrew, largely because it
# hardcodes some osxfuse libs in /usr/local/lib. A tedious solutions
# was outlined in
# https://github.com/mxcl/homebrew/pull/10183#commitcomment-1425634,
# which I've modified ever so slightly
MV="/bin/mv -f"
RM="/bin/rm"
#!/bin/bash
#Author: Brian Bianco
#Email: Brian.Bianco@gmail.com
usage()
{
cat << EOF
usage: $0 options