I hereby claim:
- I am kmckelvin on github.
- I am kmckelvin (https://keybase.io/kmckelvin) on keybase.
- I have a public key ASDthsMKcIAckkin_ZjttngkS23UKfimYHPAB3HIA08tcAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
FROM golang:1.9.4 AS build | |
WORKDIR /go/src/github.com/kmckelvin/app | |
COPY . . | |
RUN go test ./... | |
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o /app main.go | |
FROM scratch | |
COPY --from=build /app / | |
ENV PORT 80 |
const fetch = require('node-fetch'); | |
const chalk = require('chalk'); | |
const term = require('terminal-kit').terminal; | |
const fs = require('fs'), | |
path = require('path'); | |
const timestamp = () => new Date().toLocaleTimeString(); | |
const getMarketValue = market => |
const fs = require('fs'); | |
const notCommented = str => str.trim().length && str.trim()[0] !== '#'; | |
const notASCII = str => !str.startsWith('00'); | |
const ranges = str => str.substr(0, str.indexOf(' ')); | |
const isRange = str => str.indexOf('..') !== -1; | |
const firstRange = str => str.substr(0, str.indexOf('..')); | |
const secondRange = str => str.substr(str.indexOf('..') + 2); | |
const esc = str => `\\u{${str}}`; | |
const rangeToRegex = str => `[${esc(firstRange(str))}-${esc(secondRange(str))}]`; |
source "https://rubygems.org" | |
gem 'rspec' |
# ~/.tmuxinator/base.yml | |
name: base | |
root: ~/Code/<project_dir> | |
# Optional tmux socket | |
# socket_name: foo | |
# Runs before everything. Use it to start daemons etc. | |
pre: rm .zeus.sock |
require 'rspec/core/formatters/documentation_formatter' | |
class TimedFormatter < RSpec::Core::Formatters::DocumentationFormatter | |
def example_passed(example) | |
output.puts "#{passed_output(example)} - #{example.execution_result[:run_time]}" | |
end | |
def example_failed(example) | |
output.puts "#{failure_output(example, example.execution_result[:exception])} - #{example.execution_result[:run_time]}" | |
end |
class AppBuilder < Rails::AppBuilder | |
include Thor::Actions | |
include Thor::Shell | |
# Express app templating for Rails | |
# ------------------------------------ | |
# USAGE: | |
# 1. Add gems to `gem_dependencies` | |
# 2. Methods listed in SCRIPTS will be run after bundling, so make sure they each have a declaration | |
# 3. run: `rails new app_name --builder=path/to/builder.rb` (URI's work here too) |