Skip to content

Instantly share code, notes, and snippets.

@EntropyWorks
EntropyWorks / config.rb
Created March 27, 2015 15:53
trying to make this only run only if a file does not exisit
if File.exists?('user-data.master') && ARGV[0].eql?('up') || File.exists?('user-data.master.yml')
require 'open-uri'
token = open('https://discovery.etcd.io/new').read
file_names = ['user-data.master']
file_names.each do |file_name|
text = File.read(file_name)
new_contents = text.gsub(/AUTO_REPLACED_WITH_DISCOVERY_URL/, token )
@EntropyWorks
EntropyWorks / do-it.sh
Last active August 29, 2015 14:20
Starts up coreos galera cluster via docker.
#!/bin/bash
#asciinema rec -w 1 -t do-it.sh -c ./do-it.sh -y /tmp/do-it.record
#
# You can change these to whatever you need to prevent confliting
# ip ranges.
#
IP_VIRTUALBOX="192.168.240"
IP_VMWARE="172.17.8"
# Where the https://github.com/EntropyWorks/fleet-units-galera-cluster repo is placed
@EntropyWorks
EntropyWorks / Not fully working.md
Last active August 29, 2015 14:24
Vagrantfile and vangrant.yml for testing bifrost

Bifrost running inside vagrant virtualbox

Yes I know this is not perfect and Virtualbox does not pass the VT-x instructions making using it painfully slow. I will adding provider to use VMware Fusion and hopefully ESXi.

With the that out of the way.

  1. "git clone https://github.com/EntropyWorks/bifrost.git"
  2. "cd bitfrost"
# Setup influx, grafana and collector
dcos marathon app add mesos-usb/mesosphere/marathon/monitoring/1-influxdb.json
dcos marathon app add mesos-usb/mesosphere/marathon/monitoring/2-nibbler.json
dcos marathon app add mesos-usb/mesosphere/marathon/monitoring/3-grafana.json
# Run workload on 0.2 cpu cores
mesos-execute --master=127.0.1.1:5050 --name=load_1 --command="dd if=/dev/zero of=/dev/null" --resources="cpus:0.2"
# Influx db db/username/password
mesos/root/root
@EntropyWorks
EntropyWorks / ansible-requirements
Last active November 4, 2015 07:17
Some things I need
Jinja2
PyYAML
dnspython
httplib2
pip-tools
passlib
pyrax
ssh-import-id
ansible

Keybase proof

I hereby claim:

  • I am EntropyWorks on github.
  • I am entropyworks (https://keybase.io/entropyworks) on keybase.
  • I have a public key whose fingerprint is E38B B296 7DA3 4DC0 CC72 D577 6549 8C9A 64F6 0C66

To claim this, I am signing this object:

@EntropyWorks
EntropyWorks / yubitouch.sh
Created December 9, 2015 19:15 — forked from a-dma/yubitouch.sh
Bash script for setting or clearing touch requirements for cryptographic operations in the OpenPGP application on a YubiKey 4.
#!/bin/bash
# Bash script for setting or clearing touch requirements for
# cryptographic operations the OpenPGP application on a YubiKey 4.
#
# Author: Alessio Di Mauro <[email protected]>
GCA=$(which gpg-connect-agent)
DO=0
UIF=0
@EntropyWorks
EntropyWorks / 99fixbadproxy
Created January 13, 2016 20:33 — forked from trastle/99fixbadproxy
Fixing the issue with apt caused by a bad local proxy: -1- Create 99fixbadproxy at: /etc/apt/apt.conf.d/99fixbadproxy -2- Run clear.sh
Acquire::http::Pipeline-Depth "0";
Acquire::http::No-Cache=True;
Acquire::BrokenProxy=true;
@EntropyWorks
EntropyWorks / makekey.py
Created March 10, 2016 18:54 — forked from tdfischer/makekey.py
Schalge 5 Cylinder Key Generator https://noisebridge.net/wiki/Key_Milling
#!/usr/bin/env python
# makekey.py - A key making tool
# This program will accept a pin configuration for a Schalge 5 Pin lock and produce GCode to mill out the corresponding key.
#
# For example, this will produce a bump key:
# $ ./makekey.py 99999
#
# This could produce a key to something else:
# $ ./makekey.py 38457
#
LiveCD based on work done by http://willhaley.com/blog/create-a-custom-debian-live-environment/
I have been trying to create a LiveCD for myself using an in house flavor of
Debian Jessie with a 4.x kernel but have run into a blocker.
Any suggestions on how to fix this? I've tried adding union=overlay, union=overlayfs
Begin: Running /scripts/live-realpremount ... done.
Begin: Mounting "/live/medium/live/filesystem.squashfs" on "//filesystem.squashfs" via "/dev/loop" ... done.