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
!(function(){ | |
var original = console; | |
Object.defineProperty(window, 'console', { | |
get:function(){ | |
return original; | |
}, | |
set:function(value){ | |
original.log(value) | |
} | |
}) |
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 Html exposing (Html, text, div) | |
import Html.App as Html | |
import Mouse exposing (..) | |
main = | |
Html.program | |
{ init = init | |
, view = view | |
, update = update | |
, subscriptions = subscriptions |
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
// shorthand function for the Number.isInteger method | |
const isInt = Number.isInteger | |
// shorthand function for the Array.isArray method | |
const isArray = Array.isArray | |
// functional wrapper for the Array.reduce method | |
const reduce = f => initVal => arr => arr.reduce(f, initVal) | |
// functional wrapper for the Array.concat method |
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 | |
function dammit_bundler() { | |
bundle clean | |
bundle install | |
} | |
function dammit_npm() { | |
rm -fr ./node_modules/ | |
npm cache clean -f |
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 node:6 | |
RUN npm install -g bs-platform | |
RUN yarn global add serve | |
# Copy just the package.json first to install deps | |
ADD src/package.json /app/package.json | |
WORKDIR /app | |
RUN npm install |
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
[@bs.module "react-click-outside"] | |
external clickOutside: ReasonReact.reactClass = "default"; | |
[@bs.deriving abstract] | |
type jsProps = { | |
className: option(string), | |
onClickOutside: ReactEvent.Mouse.t => unit, | |
}; | |
let make = (~className=?, ~onClickOutside, children) => |
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
/** | |
* This gulpfile will copy static libraries and a index.html file as well as | |
* merge, babelify and uglify the rest of the javascript project. | |
* | |
* TODO: | |
* - Separate media, libs and src with different watchers. | |
* - Media and libs should only be copied to dist if they are different sizes. | |
* | |
* The expected project is to be laid out as such: | |
* |
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 | |
set -e | |
set -o pipefail | |
CURRENT_OTP=$1 | |
NEW_OTP=$2 | |
CURRENT_NAME="" | |
NEW_NAME="" |
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 ReactUpdate; | |
type context = { | |
rate: int, | |
comment: string, | |
}; | |
type action = | |
| Open | |
| Close |
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
port module Spelling exposing (..) | |
import Html exposing (..) | |
import Html.Events exposing (..) | |
import String | |
main = | |
program | |
{ init = init |
OlderNewer