Instantly share code, notes, and snippets.

View build-default.yaml
apiVersion: build.knative.dev/v1alpha1
kind: Build
metadata:
creationTimestamp: 2018-11-11T23:25:45Z
generateName: simple-app-
generation: 1
name: simple-app-7s8pf
namespace: default
resourceVersion: "14435"
selfLink: /apis/build.knative.dev/v1alpha1/namespaces/default/builds/simple-app-7s8pf
View bootstrap-gke.sh
#!/bin/bash
set -eu
export CLUSTER_NAME=${CLUSTER_NAME:-knative}
export CLUSTER_REGION=${CLUSTER_REGION:-us-west1}
export CLUSTER_ZONE=${CLUSTER_ZONE:-us-west1-c}
usage() {
echo "Bootstrap Kube/Helm/Knative on GKE"
View martinez-error.js
var martinez = require('martinez-polygon-clipping');
// https://skyvector.com/?fpl=3529S14100E%203556S14216E%203557S14217E%203558S14222E%203650S14259E%203658S14256E%203730S14251E%203720S14319E%203714S14356E%203705S14444E%203712S14510E%203627S14548E%203559S14623E%203553S14610E%203544S14547E%203535S14525E%203526S14502E%203516S14440E%203507S14417E%203458S14355E%203448S14333E%203438S14311E%203429S14249E%203419S14227E%203409S14205E%203359S14143E%203349S14122E%203339S14100E%203529S14100E
var big = [ [ 141, -35.49 ],
[ 142.27, -35.93 ],
[ 142.28, -35.95 ],
[ 142.37, -35.97 ],
[ 142.98, -36.83 ],
[ 142.93, -36.97 ],
[ 142.85, -37.5 ],
View readme.md
curl -sL https://gist.githubusercontent.com/drnic/b42bbcda9b47bd2241cdc41cdfd4abed/raw/c5c2e27377c43bdd04dd86463ca48cce3677580d/run.sh | bash
View ClusterManifest.SingleMachine.DNS.xml
<?xml version="1.0" encoding="utf-8"?>
<ClusterManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="Test Generated ClusterManifest" Version="v1" Description="Test Generated ClusterManifest" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<NodeTypes>
<NodeType Name="N0010Ref">
<Endpoints>
<ClientConnectionEndpoint Port="19000" />
<LeaseDriverEndpoint Port="19001" />
<ClusterConnectionEndpoint Port="19002" />
<HttpGatewayEndpoint Port="19080" Protocol="http" />
<ServiceConnectionEndpoint Port="19006" />
View ClusterManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<ClusterManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="Test Generated ClusterManifest" Version="v1" Description="Test Generated ClusterManifest" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<NodeTypes>
<NodeType Name="BOSH">
<Endpoints>
<!-- see ServiceFabricServiceModel.xsd under FabricEndpointsType -->
<ClientConnectionEndpoint Port="19000" />
<LeaseDriverEndpoint Port="19001" />
<ClusterConnectionEndpoint Port="19002" />
<ServiceConnectionEndpoint Port="19006" />
View log
[ 0%] Building C object src/retail/native/FabricCommon/dll/CMakeFiles/objects_fabriccommon2.dir/TraceTemplates.Linux.c.o
[ 0%] Building C object src/retail/native/FabricUUID/CMakeFiles/objects_FabricUUID.dir/__/__/__/prebuilt/sdk/FabricClient_i.c.o
In file included from /src/prod/src/retail/native/FabricCommon/dll/TraceTemplates.Linux.c:12:
/src/prod/src/retail/native/FabricCommon/dll/TraceTemplates.Linux.h:23:1: error: incomplete definition of type 'struct lttng_ust_tracepoint'
TRACEPOINT_EVENT(
^~~~~~~~~~~~~~~~~
/src/prod/src/retail/native/FabricCommon/dll/tracepoint.h:498:2: note: expanded from macro 'TRACEPOINT_EVENT'
_DECLARE_TRACEPOINT(provider, name, _TP_PARAMS(args)) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/src/prod/src/retail/native/FabricCommon/dll/tracepoint.h:156:73: note: expanded from macro '_DECLARE_TRACEPOINT'
View build-script.sh
set -e # exit immediately if a simple command exits with a non-zero status
set -u # report the usage of uninitialized variables
# Detect # of CPUs so make jobs can be parallelized
CPUS=$(grep -c ^processor /proc/cpuinfo)
# Available variables
# $BOSH_COMPILE_TARGET - where this package & spec'd source files are available
# $BOSH_INSTALL_TARGET - where you copy/install files to be included in package
export HOME=/var/vcap
View bumpme
Wed Nov 14 12:20:29 UTC 2018
View convert-to-credhub.sh
#!/bin/bash
cd ${1:?USAGE: convert-to-credhub.sh path/to/ci}
function indent() {
c='s/^/ /'
case $(uname) in
Darwin) sed -l "$c";;
*) sed -u "$c";;
esac