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 ruby | |
repo = ENV['REPO'] | |
puts ARGF.read.strip.gsub(/(\s+|\A)#(\d+)\b/m) {|m| "#{$1}#{repo}##{$2}" } |
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 node | |
const isScalar = (v) => { | |
return !(v === null || v === undefined || typeof v === 'object'); | |
}; | |
const mergeObject = (a, b) => { | |
const keys = new Set([...Object.keys(a), ...Object.keys(b)]); | |
const accum = {}; | |
for (const k of keys) { |
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
{ | |
"definitions": {}, | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"title": "configuration", | |
"properties": { | |
"ADDR": { | |
"type": "string" | |
}, | |
"DSN": { |
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* hello() { | |
try { | |
while(true) { | |
yield 9 | |
yield 3 | |
yield 2 | |
} | |
} catch(e) { | |
console.log('oops') | |
} finally { |
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
const { rules: eslintRules } = require('./.eslintrc.js'); | |
const tslintConfig = require('./tslint.json'); | |
const { rules: tslintRules } = tslintConfig; | |
console.log( | |
JSON.stringify( | |
{ | |
...tslintConfig, | |
rules: { |
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
(() => { | |
const submitBtn = document.querySelector('input[type=submit]'); | |
let startedAt; | |
const flash = (ts) => { | |
if (!startedAt) startedAt = ts; | |
const elapsed = ts - startedAt; | |
if (elapsed > 100) { | |
const e = new MouseEvent('click', { | |
view: window, | |
bubbles: true, |
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 buildpack-deps:jessie | |
RUN mkdir -p /app/data && touch /app/data/PROCESS-$(date +%s) | |
CMD ["ls", "/app/data"] |
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
query { | |
repository(owner: "aereal", name: "delay-time-calc") { | |
ref(qualifiedName: "refs/heads/master") { | |
target { | |
... on Commit { | |
tree { | |
entries { | |
name | |
object { | |
... on Tree { |
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
'use strict'; | |
(() => { | |
const hairImage = document.querySelector('#hairImage') | |
const faceImage = document.querySelector('#faceImage') | |
const canvas = document.querySelector('#resultCanvas') | |
const ctx = canvas.getContext('2d') | |
const updateCanvas = (filter) => { | |
ctx.drawImage(faceImage, 0, 0) | |
ctx.save() |
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
================== | |
WARNING: DATA RACE | |
Write at 0x000001615700 by goroutine 6: | |
reflect.Value.SetString() | |
/usr/local/Cellar/go/1.9.2/libexec/src/reflect/value.go:1537 +0x64 | |
github.com/aereal/go-magi/vendor/github.com/jessevdk/go-flags.convert() | |
/Users/aereal/devel/src/github.com/aereal/go-magi/vendor/github.com/jessevdk/go-flags/convert.go:200 +0x1011 | |
github.com/aereal/go-magi/vendor/github.com/jessevdk/go-flags.(*Option).set() | |
/Users/aereal/devel/src/github.com/aereal/go-magi/vendor/github.com/jessevdk/go-flags/option.go:226 +0x23c | |
github.com/aereal/go-magi/vendor/github.com/jessevdk/go-flags.(*Parser).parseOption() |