Skip to content

Instantly share code, notes, and snippets.

View wbyoung's full-sized avatar

Whitney Young wbyoung

  • FadingRed
  • Portland, OR
View GitHub Profile
#!/bin/bash
set -e
JQ="jq --raw-output --exit-status"
if [ -x "$(command -v kustomize)" ]; then
KUSTOMIZE="kustomize build"
else
KUSTOMIZE="kubectl kustomize"
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: managedcertificates.networking.gke.io
spec:
group: networking.gke.io
names:
kind: ManagedCertificate
plural: managedcertificates
shortNames:
@wbyoung
wbyoung / environment.js
Created July 23, 2018 17:59
Relay environment while exploring deferred queries
/* @flow */
import {
forOwn,
size,
get,
transform,
noop,
} from 'lodash';
/* @flow */
import React, { type Element } from 'react';
import Relay from 'react-relay/classic';
class CreateListMutation extends Relay.Mutation {
static fragments = {
viewer: () => Relay.QL`
fragment on User {
id
#!/bin/bash
set -e
JQ="jq --raw-output --exit-status"
# @env region
# @env task_family
# @returns via stderr
locate-task() {
@wbyoung
wbyoung / aws-deploy.sh
Last active September 12, 2017 02:26
#!/bin/bash
set -e
JQ="jq --raw-output --exit-status"
escape-json() {
python -c "import sys; import json; sys.stdout.write(json.dumps(sys.stdin.read().strip())[1:-1])"
}
var through = require('through2');
var setup = function(b, cb) {
b.on('reset', cb);
cb();
};
module.exports = function offsetify(b, externalBundles) {
setup(b, function() {
b.pipeline.get('sort').push(through.obj(function(row, enc, next) {
@wbyoung
wbyoung / app.js
Last active August 29, 2015 14:08
Example liftoff issue
var Liftoff = require('liftoff');
var argv = require('minimist')(process.argv.slice(2));
var invoke = function(env) {
console.log('modulePath: %j', env.modulePath);
console.log('configBase: %j', env.configBase);
console.log('cwd: %j', env.cwd);
};
var liftoff = new Liftoff({
@wbyoung
wbyoung / httpd.conf
Created October 13, 2014 18:49
Run Apache in current directory with PHP enabled.
DocumentRoot "."
ServerName localhost
ErrorLog "apache_error_log"
LogLevel warn
LoadModule authz_host_module /usr/libexec/apache2/mod_authz_host.so
LoadModule auth_basic_module /usr/libexec/apache2/mod_auth_basic.so
LoadModule auth_digest_module /usr/libexec/apache2/mod_auth_digest.so
LoadModule deflate_module /usr/libexec/apache2/mod_deflate.so
LoadModule log_config_module /usr/libexec/apache2/mod_log_config.so
@wbyoung
wbyoung / package.json
Created June 12, 2014 16:18
Simple static server
{
"name": "foursquare",
"version": "0.1.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"author": "Whitney Young",