Skip to content

Instantly share code, notes, and snippets.

View dotfold's full-sized avatar

James McNamee dotfold

  • NVIDIA
  • Mountain View, CA
View GitHub Profile
# traefik-config-map.yml
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: kube-system
name: traefik-conf
data:
traefik.toml: |
# traefik.toml
apiVersion: v1
kind: Service
metadata:
name: ingress-nginx
namespace: default
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
type: NodePort
{
"kind": "Namespace",
"apiVersion": "v1",
"metadata": {
"name": "ingress-nginx",
"labels": {
"name": "ingress-nginx"
}
}
}
@dotfold
dotfold / Link.re
Last active May 17, 2018 22:01
ReasonML Link and Router components that integrate with the built in router
@dotfold
dotfold / install-pre-commit.sh
Created October 5, 2017 22:48 — forked from stefansundin/install-pre-commit.sh
Git pre-commit check to stop accidental commits to master and develop branches. There is also a variant with a core.whitespace check.
#!/bin/sh
# This gist contains pre-commit hooks to prevent you from commiting bad code or to the wrong branch.
# There are four variants that I have built:
# - pre-commit: stops commits to "master" and "develop" branches.
# - pre-commit-2: also includes a core.whitespace check.
# - pre-commit-3: the core.whitespace check and an EOF-newline-check.
# - pre-commit-4: only the core.whitespace check.
# Set desired version like this before installing:
# FILE=pre-commit

Bug Description:
brief description of the observed bug

Steps to reproduce:
brief steps of how to reproduce the bug

Expected outcome:

// package.json scripts
"test:e2e-setup": "mkdir -p bin && node ./test/testSupport/selenium-download.js",
"test:e2e": "nightwatch --config ./test/e2e/conf/nightwatch.conf.js -e default",
// test/testSupport/selenium-download.js
var selenium = require('selenium-download')
selenium.ensure('./bin', function (error) {
if (error) {
console.error(error ? error.stack : 'Could not download selenium, most likely a network issue and not with `selenium-download`.')
process.exit(0)
/* eslint-disable react/prop-types */
const { createElement: el, Component } = require('react')
class AutoSizer extends Component {
constructor (props) {
super(props)
this.state = {
height: 400,
width: 400
}
const thinger = () => 'stuff'
const session$ = function (key) {
const request = request('GET', 'YOUR_URL')
return Rx.Observable.create(observer) {
req.on('response', (res) => {
// check status code
// obs.onError() if not 200
// else...
res.on('end', () => {
let result = ''