Skip to content

Instantly share code, notes, and snippets.

View topherbullock's full-sized avatar

Topher Bullock topherbullock

View GitHub Profile
@topherbullock
topherbullock / Gruntfile.js
Created March 24, 2014 13:28
Watch Grunt Jasmine
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jasmine: {
default : {
src: 'src/**/*.js',
options: {
specs: 'spec/*spec.js',
@topherbullock
topherbullock / app.js
Last active August 29, 2015 14:06
Node.js JSON Middleware Benchmark
var http = require('http');
var config = {
port : 1337,
targetAPI : {
hostname: 'date.jsontest.com',
port: 80,
path: '',
method: 'GET',
agent : false
@topherbullock
topherbullock / EvalWithContext.java
Last active August 29, 2015 14:06
NashornContext
///....get Nashorn ScriptEngine instance before
//create a new Simple Script Context
ScriptContext myCtx = new SimpleScriptContext();
//create a new Bindings object (basically a hash of var => value)
Bindings b = new SimpleBindings();
b.put("foo", "world");
//set bindings on your context and apply them to the Global Scope
myCtx.setBindings(b, ScriptContext.GLOBAL_SCOPE);
@topherbullock
topherbullock / blockFuncHoistingTest.js
Created September 15, 2014 19:10
ECMAScript Hoisting and Block-scoped Functions
var logger = ( typeof console !== 'undefined' && typeof console.log === "function" ) ? console : { log : print };
var moduleAPI = (function (exports) {
exports.root = {};
exports.ifBlock = {};
exports.tryBlock = {};
exports.funcBlock = {};
exports.funcInTry = {};
exports.funcInIf = {};
---
resources:
jobs:
- name: make-it-happen
plan:
- do:
- task: boop
config:
platform: linux
@topherbullock
topherbullock / README.md
Last active November 6, 2019 04:01
Pizza Pipeline

#Overview This simple pipeline illustrates how tasks and resources fit together to form jobs within a pipeline in Concourse. A pipeline is represented as a YAML file, which can be 'configured' onto a running instance of Concourse.

#Environment Setup

The simplest way to get a Concourse instance up and running is to run a local Vagrant VM with Concourse preconfigured.

While the VM boots up, you should also set up an AWS s3 bucket with a few images mapping to the resources listed in the pipeline YAML:

@topherbullock
topherbullock / cf-deploy-bump.yml
Created June 1, 2016 19:15
Github Branch Bump + CF Deploy Pipeline
resources:
- name: pws
type: cf
source:
api: https://api.run.pivotal.io
username: [email protected]
password: {{password}}
organization: topherbullock
space: development
- name: static-app-dev
@topherbullock
topherbullock / config.yml
Last active November 17, 2016 20:23
✈️ Concourse task variables ✈️
---
the-thing: 👨🏻
@topherbullock
topherbullock / org_nuker.sh
Last active March 1, 2017 15:47
Org Nuker
#!/bin/bash
function delete_orgs() {
ORGS=$@
echo "Deleting orgs : $ORGS"
FAILED_ORGS=()
DELETED_ORGS=()
for org in $ORGS; do
cf delete-org -f $org > /dev/null 2>&1
#!/bin/bash
function delete_orgs() {
ORGS=$@
echo "Deleting orgs : $ORGS"
FAILED_ORGS=()
DELETED_ORGS=()
for org in $ORGS; do
cf delete-org -f $org > /dev/null 2>&1