Skip to content

Instantly share code, notes, and snippets.

View jgensler8's full-sized avatar
🏗️
Loading...

Jeff Gensler jgensler8

🏗️
Loading...
View GitHub Profile
@jgensler8
jgensler8 / .amethyst
Last active September 7, 2021 21:50
my i3 to Amethyst conversion
{
"LAYOUTS": "----------------------",
"layouts": [
"tall",
"wide",
"fullscreen",
"column"
],
"MODIFIERS": "----------------------",
#!/bin/bash
os="linux"
arch="amd64"
version="0.10.0"
packer_tmp_download=/tmp/packer_${version}_${os}_${arch}.zip
packer_install_location=/usr/local/bin
wget "https://releases.hashicorp.com/packer/${version}/packer_${version}_${os}_${arch}.zip" -O "$packer_tmp_download"
unzip "$packer_tmp_download" -d "$packer_install_location"
@jgensler8
jgensler8 / create_docker_machine_subnets.sh
Last active March 29, 2016 21:31
Maybe get around those funny networking things
docker-machine create --driver virtualbox --tls-san 127.0.0.1 --virtualbox-hostonly-cidr "10.0.0.1/24" a
docker-machine create --driver virtualbox --tls-san 127.0.0.1 --virtualbox-hostonly-cidr "172.16.0.1/24" b
docker-machine create --driver virtualbox --tls-san 127.0.0.1 --virtualbox-hostonly-cidr "192.168.0.1/24" c
# set your http_proxy and https_proxy variables before running
docker-machine create --driver virtualbox --tls-san 127.0.0.1 --engine-env HTTP_PROXY=${http_proxy} --engine-env HTTPS_PROXY=${https_proxy} --virtualbox-hostonly-cidr "10.0.1.1/24" ap
docker-machine create --driver virtualbox --tls-san 127.0.0.1 --engine-env HTTP_PROXY=${http_proxy} --engine-env HTTPS_PROXY=${https_proxy} --virtualbox-hostonly-cidr "172.16.1.1/24" bp
docker-machine create --driver virtualbox --tls-san 127.0.0.1 --engine-env HTTP_PROXY=${http_proxy} --engine-env HTTPS_PROXY=${https_proxy} --virtualbox-hostonly-cidr "192.168.1.1/24" cp
var microlib = require('microlib');
module.exports = {
addTwoMicroservice: microlib.builder
.setFunction(function(one, two) {
return one + two;
})
.build()
// spinUpON is provided by the builder
}
var microlib = require('microlib');
var redis_service = require('redis-service');
module.exports = {
db: microlib.builder
.injectPersistentStorage(redis_service, os.environ.REDIS_URL)
.setScheduleStrategy(microlib.GRAVITY_STRATEGY)
.setFunction(function(services, args){
return services[0](args[0]);
})
var microlib = require('microlib');
var redis_storage = require('microlib-redis-storage');
module.exports = {
statichost: microlib.builder
.injectPersistentStorage(redis_storage, os.environ.REDIS_URL)
.setScheduleStrategy(microlib.COLOCATE_STRATEGY)
.setFunction(function(services, args) {
return services[0](args[0]);
})
# This is here for reference
FROM node
COPY ./microlib-current-app.js /
ENTRYPOINT node ./microlib-current-app.js
var jayson = require('jayson');
// create an array of injected services
var services = [
function(args) {
return jayson.client.http({
host: process.env.MICROLIB_SERVICE_HOST,
port: process.env.MICROLIB_SERVICE_PORT
}).request("addtwo", args, function(err, response) {
@jgensler8
jgensler8 / kwmrc
Last active June 22, 2016 03:48
i3/amethyst -ish
// !!! VERSION 3 COMPATIBLE
/*
This is a sample config for Kwm
Commands prefixed with 'kwmc' will call
local functions corresponding to the
kwmc syntax.
To run an external program or command,
@jgensler8
jgensler8 / Appfile
Last active July 2, 2016 20:09
“Templating” a Deployment Process locally with Otto’s Custom app type
application {
name = "DockerOnCoreOS"
type = "custom"
}
customization {
dev_vagrantfile = "./coreos-vagrant/Vagrantfile"
}