This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as shelljs from 'shelljs' | |
import db from 'path-to-knex-client' | |
import config from 'src/config' | |
/** | |
Mocha hooks | |
*/ | |
before(async () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open StoryBook; | |
let _module = [%bs.raw "module"]; | |
storiesOf("ReasonML Example", _module) | |
->addDecorator(storyFn => | |
<div style={ReactDOMRe.Style.make(~textAlign="center", ~marginTop="50px", ())}> | |
{storyFn()} | |
</div> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Very nasty way to control Apollo cache in reason-apollo | |
*/ | |
[@bs.module] external gql: ReasonApolloTypes.gql = "graphql-tag"; | |
let shifts_query = | |
gql(. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
kubectl delete -n staging configmap hasura-configmap | |
kubectl create -n staging configmap hasura-configmap --from-file=metadata.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* monad */ | |
type box('t) = Foo('t); | |
let return = (x) => Foo(x); | |
let bind = (b, f) => switch b { | |
| Foo(v) => f(v) | |
}; | |
/* proof helpers */ | |
let a = 1; | |
let m = Foo(a); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx | |
COPY nginx.conf /etc/nginx/nginx.conf | |
RUN apt-get update && apt-get install -y inotify-tools | |
COPY watcher.sh /watcher.sh | |
RUN chmod +x /watcher.sh | |
CMD ["/watcher.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Check for Homebrew and install it if missing | |
if test ! $(which brew) | |
then | |
echo "Installing Homebrew..." | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
# Make sure we’re using the latest Homebrew. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Valid doesn't really need any metadata */ | |
type Valid = { | |
t: true | |
} | |
/** Invalid should describe all the problems */ | |
type Invalid = { | |
t: false | |
errors: Array<{ text: string /** object, in case more fields are needed here */ }> | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"extends": [ | |
"tslint:recommended", | |
"tslint-config-prettier" | |
], | |
"rulesDirectory": [ | |
"tslint-plugin-prettier" | |
], | |
"rules": { | |
"no-console": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="./identifierMappings-types.d.ts" /> | |
import * as knex from 'knex'; | |
import * as config from '../config' | |
import { knexSnakeCaseMappers } from './identifierMappings' | |
const db: knex = knex({ | |
client: 'pg', | |
connection: config.DATABASE_URL, | |
...knexSnakeCaseMappers(), | |
}) |