This file contains hidden or 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
type alias Model = | |
{ counter : Int | |
} | |
type alias InitModel = | |
{ counter : Maybe Int | |
} | |
This file contains hidden or 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 express = require('express') | |
const axios = require('axios') | |
const format = require('util').format | |
const app = express() | |
app.use(function (request, response, next) { | |
console.log('Got request') |
This file contains hidden or 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 moment = require('moment') | |
const dateStringWOTimeZone = '2016-05-29' | |
const newDate = new Date(dateStringWOTimeZone).toISOString() | |
const momentDate = moment(dateStringWOTimeZone).toISOString() | |
const momentUTCDate = moment.utc(dateStringWOTimeZone).toISOString() | |
const momentFromDate = moment(new Date(dateStringWOTimeZone)).toISOString() | |
console.log(` | |
${newDate} = new Date('${dateStringWOTimeZone}').toISOString() |
This file contains hidden or 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
0 info it worked if it ends with ok | |
1 verbose cli [ '/usr/local/bin/node', | |
1 verbose cli '/Users/danny/bin/node_modules/.bin/npm', | |
1 verbose cli '--registry=http://127.0.0.1:50321', | |
1 verbose cli 'i' ] | |
2 info using npm@3.7.2 | |
3 info using node@v5.11.0 | |
4 silly loadCurrentTree Starting | |
5 silly install loadCurrentTree | |
6 silly install readLocalPackageData |
This file contains hidden or 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
PID: 4785 (atom) | |
UID: 1000 (despairblue) | |
GID: 100 (users) | |
Signal: 11 (SEGV) | |
Timestamp: Sat 2016-03-19 22:46:00 CET (2min 48s ago) | |
Command Line: /usr/share/atom-beta/atom --type=renderer --js-flags=--harmony --no-sandbox --lang=en-US --node-integration=true --num-raster-threads=2 --content-image-texture-target=3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553 --video-image-texture-target=3553 --disable-accelerated-video-decode --disable-webrtc-hw-encoding --disable-gpu-compositing --channel=4735.0.1978933190 --v8-natives-passed-by-fd --v8-snapshot-passed-by-f | |
Executable: /usr/share/atom-beta/atom | |
Control Group: /user.slice/user-1000.slice/session-c2.scope | |
Unit: session-c2.scope | |
Slice: user-1000.slice |
This file contains hidden or 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
module TopologySort (..) where | |
import Html exposing (..) | |
type alias Topology = | |
List ( String, List String ) | |
initialTopology : Topology |
This file contains hidden or 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 at your own risk, might eat hamster and nose dragons | |
git branch -m master master-bak | |
git checkout --orphan master | |
git reset --hard | |
git commit --allow-empty -m 'init' | |
git merge --ff --squash master-bak | |
git commit --amend | |
git push --force |
This file contains hidden or 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' | |
require('./test1') | |
require('./test2') |
This file contains hidden or 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 {getUser} from 'DB' | |
const getUserPromise = Promise.promisify(getUser) | |
const goify = fun => | |
() => | |
fun() | |
.then(val => [undefined, val]) | |
.catch(error => [error]) |
This file contains hidden or 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 map = new Map([[1,2], ['a', 'b']]); | |
for (const item of map.keys()) { | |
console.log(item); | |
} |