Skip to content

Instantly share code, notes, and snippets.

View squeedee's full-sized avatar
🚛
Supply Chain Specialist

Rasheed Abdul-Aziz squeedee

🚛
Supply Chain Specialist
View GitHub Profile
@squeedee
squeedee / 10-cf-internet.conf
Last active August 29, 2015 14:02
Working firewall
# /etc/rsyslog.d/10-cf-internet.conf
# Log kernel generated UFW log messages to file
:msg,contains,"cf-to-internet-traffic:" /var/log/cf-internet.log
|2.1.1| RashBookPro in ~/workspace/immute-template
± mk+ra |master ✗| → lein install
Created /Users/rasheed/workspace/immute-template/target/lein-template-0.1.0-SNAPSHOT.jar
Wrote /Users/rasheed/workspace/immute-template/pom.xml
|2.1.1| RashBookPro in ~/workspace/immute-template
± mk+ra |master ✗| → cd ..
|2.1.1| RashBookPro in ~/workspace
@squeedee
squeedee / Error
Last active August 29, 2015 14:00
Started preparing configuration > Binding configuration. Failed: Error filling in template `ctl.erb' for `etcd_leader_z1/0' (line 26: undefined method `collect' for "(( .properties.nats.machines ))":String) (00:00:01)
Error 100: Error filling in template `ctl.erb' for `etcd_leader_z1/0' (line 26: undefined method `collect' for "(( .properties.nats.machines ))":String)
@squeedee
squeedee / down.sh
Last active August 29, 2015 13:59
Emulate the enterprise inside BOSH-Lite
sudo iptables -A OUTPUT -o eth0 -m state --state ESTABLISHED -j ACCEPT
sudo iptables -A OUTPUT -o eth0 -j DROP
@squeedee
squeedee / pack_and_deploy.rb
Created April 8, 2014 20:09
zip up the buildpack and install it as an admin buildpack (and other stuff)
require "tmpdir"
require "zip"
EXCLUDE_FROM_BUILDPACK = [
/\.git/,
/repos/
]
def package
Dir.mktmpdir do |temp_dir|
@squeedee
squeedee / deploy.sh
Created April 8, 2014 17:49
Test the heck out of a buildpack deploy
for run in {1..10}; do cf delete -f rails_latest_web_app && cf push rails_latest_web_app --no-start && cf bind-service rails_latest_web_app lilelephant && cf push rails_latest_web_app -c 'bundle exec rake db:migrate && bundle exec rails s -p $PORT' -b https://github.com/squeedee/heroku-buildpack-ruby.git; done
@squeedee
squeedee / gist:9750420
Created March 24, 2014 22:12
Docs for finding a droplet within a bosh-lite instance

Find a droplet on Bosh-Lite CF

Locate the db connection string

Find the cloud controller db connection string

bosh ssh api_z1
grep postgres `find /var/vcap/data/jobs/cloud_controller_ng/ cloud_controller_ng.yml`
exit # leave the container
@squeedee
squeedee / feature_spec_helper.rb
Last active December 30, 2015 08:49
Getting development dependencies for a dummy app
require 'spec_helper'
require 'simple_bdd'
RSpec.configure do |config|
config.include SimpleBdd
end
ENV["RAILS_ENV"] ||= "test"
Bundler.require(:development)
@squeedee
squeedee / gist:7217317
Created October 29, 2013 15:53
workday credential cache
git config credential.helper 'cache --timeout 28800'
typedef struct {
float hue;
float saturartion;
float value;
} hsv;
long hsv_to_rgb(hsv color) {
return 0xff0000;
}