Skip to content

Instantly share code, notes, and snippets.

View lusis's full-sized avatar

John E. Vincent lusis

View GitHub Profile
@marksteve
marksteve / docker-zfs.md
Last active November 23, 2016 01:13
Use ZFS Docker storagedriver
  1. Create ZFS pool

sudo zpool create -f zroot /dev/sdaX

  1. Create ZFS dataset

sudo zfs create -o mountpoint=/var/lib/docker zroot/docker

  1. Edit /etc/defaults/docker
@darron
darron / default_ami_setup.sh
Last active September 5, 2017 14:31
Ubuntu 14.04 AWS Instance Store HVM build - actually worked - built and booted. Much thanks to: https://github.com/Lumida/packer/wiki/Building-Ubuntu-12.04-and-14.04-HVM-Instance-Store-AMIs
#!/bin/bash
# server-jre-8u5-linux-x64.tar.gz
DEBIAN_FRONTEND=noninteractive
UCF_FORCE_CONFFNEW=true
export UCF_FORCE_CONFFNEW DEBIAN_FRONTEND
apt-get update
apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" dist-upgrade
@lusis
lusis / README.md
Created November 19, 2014 05:12
Binary CM options

Thoughts on a binary strongly typed CM system

I've been thinking for a while about a strongly typed binary CM system based on Golang (Rust would work as well).

The model depends on something that compiles to a single binary and compiles very fast. Typically golang fits this bill. I've not played with Rust just yet but if it compiles fast, it would work as well.

The workflow goes something like this:

  • Upload source to the "server" component.
  • Server component compiles a binary for all hosts it has registered that the code would apply to (i.e. role:webserver)
  • Optionally for unknown clients, the binary is compiled on-the-fly when the host checks in and provides at least platform information. The coolest part is that golang is easily cross-compiled so this works for all platforms that check in.
@joshrotenberg
joshrotenberg / embedded.go
Last active August 4, 2023 08:56
embedded nsqd
package main
// This is a basic example of running an nsqd instance embedded. It creates
// and runs an nsqd with all of the default options, and then produces
// and consumes a single message. You are probably better off running a
// standalone instance, but embedding it can simplify deployment and is
// useful in testing.
// See https://github.com/nsqio/nsq/blob/master/nsqd/options.go and
// https://github.com/nsqio/nsq/blob/master/apps/nsqd/nsqd.go for
@pablitoc
pablitoc / configure_proxy_protocol.md
Last active April 12, 2023 15:21
Configuring Proxy Protocol

##Install AWS CLI Tools##

  1. Install AWS CLI Tools. You can also use the EC2 API Tool if you are more comfortable with them. But this write-up uses the EC2 CLI.
  2. Create a user via Amazon IAM or download the security accessID and securitykey you will need it to query Amazon CLI.
  3. using Terminal cd into .aws directory cd ~/.aws edit or create new file named config paste the following contents inside.
    `[default]`
    `aws_access_key_id = ACCESS_ID`
    `aws_secret_access_key = SECRET_ID`
    `output = json OR bson OR text`
    `region = PREFERRED_AWS_REGION`

Save the file as "config"

@Estella
Estella / gist:995580dda5bad445e019
Created September 25, 2014 18:42
# Bash Vuln CVE-2014-6271 / CVE-2014-7169 - Fix/Notes
#!/bin/sh
wget http://ftp.gnu.org/pub/gnu/bash/bash-4.3.tar.gz
wget http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-001
wget http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-002
wget http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-003
wget http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-004
wget http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-005
wget http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-006
wget http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-007
@charlesjohnson
charlesjohnson / gemrc.erb
Last active August 29, 2015 14:05
Use a .gemrc file with Omnibus chef-client
:sources:
- http://<%= node['gem_file']['host'] %>:<%= node['gem_file']['port'] %>/
@mAAdhaTTah
mAAdhaTTah / 1_netatalk-3-install-on-ubuntu-14.04.sh
Last active December 11, 2019 16:20 — forked from beshkenadze/1_netatalk-3-install-on-debian-7
Shell script to install Netatalk 3 on Ubuntu 14.04
# Get root:
sudo su
# Install prerequisites:
apt-get install build-essential pkg-config checkinstall git avahi-daemon libavahi-client-dev libcrack2-dev libwrap0-dev autotools-dev automake libtool libdb-dev libacl1-dev libdb5.1-dev db-util db5.1-util libgcrypt11 libgcrypt11-dev
# Build libevent from source:
cd /usr/local/src
@altryne
altryne / Readme.md
Created May 7, 2014 17:46
Hubot Slack webhook

#A script to post back to Slack via the webhooks API

##why this exists?

Slack's own hubot adapter needs the hubot installation to be accessible via web. This can be problematic in some cases, as a security risk.

This hack let's you run your Hubot behind a firewall, and connect to Slack via the IRC gateway.

To respond, Hubot uses the incoming webhooks end-point of Slack.

@hbokh
hbokh / gist:33d9ff5d87e433410e77
Created May 6, 2014 12:25
Logstash, collectd and kibana for one host's system resources
{
"title": "System Resources",
"services": {
"query": {
"list": {
"0": {
"query": "collectd_type:\"load\"",
"alias": "Load",
"color": "#70DBED",
"id": 0,