Skip to content

Instantly share code, notes, and snippets.

View carldanley's full-sized avatar

Carl Danley carldanley

View GitHub Profile
// external dependencies
const bPromise = require('bluebird');
// logic
exports.up = function(db, types) {
return db.sequelize.transaction(bPromise.coroutine(function* (t) {
yield db.createTable('listings', {
id: {
@carldanley
carldanley / ingress.yaml
Last active July 31, 2018 18:43
Intro to Kubernetes Ingress - July 31, 2018
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: hello-world
namespace: sfkm
annotations:
kubernetes.io/ingress.class: "nginx"
kubernetes.io/tls-acme: "true"
labels:
app: hello-world
=============================================================================================================================================
BEFORE
=============================================================================================================================================
root@k8s-master-01:/home/carldanley# fio --rw=write --ioengine=sync --fdatasync=1 --directory=test-data --size=22m --bs=2300 --name=mytest
mytest: (g=0): rw=write, bs=(R) 2300B-2300B, (W) 2300B-2300B, (T) 2300B-2300B, ioengine=sync, iodepth=1
fio-3.1
Starting 1 process
mytest: Laying out IO file (1 file / 22MiB)
$Modules = Get-Module -ListAvailable
if ($Modules.name -notcontains "VMware.PowerCLI") {
Install-Module VMware.PowerCLI -Confirm:$False
}
if ($Modules.name -notcontains "VMware.WorkloadManagement") {
Install-Module VMware.WorkloadManagement -Confirm:$False
}
when CLIENT_ACCEPTED {
set proxyheader "PROXY TCP[IP::version] [IP::remote_addr] [IP::local_addr] [TCP::remote_port] [TCP::local_port]\r\n"
}
when SERVER_CONNECTED {
TCP::respond $proxyheader
}
@carldanley
carldanley / dom-ready.js
Created September 5, 2012 16:35
Simple DOM ready() detection without jQuery
var DOM = new function(){
var IS_READY = false;
var CALLBACKS = [];
var SELF = this;
SELF.ready = function( callback ){
//check to see if we're already finished
if( IS_READY === true && typeof callback === 'function' ){
callback();
return;