import assert from './assert'
import { runInTimezone } from './runInTimezone'
const offset = await runInTimezone('Asia/Tokyo', () => new Date().getTimezoneOffset())
assert.strictEquals(offset, -540)
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
peco_monorepo() { | |
local module_paths=($(node -e 'console.log(module.paths.join(" "))')) | |
local found=0 | |
for module_paths in ${module_paths[@]} | |
do | |
local lerna_bin="$module_paths/.bin/lerna" | |
if [ ! -f $lerna_bin ]; then | |
continue | |
fi |
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 licenses = require('./licenses.json') | |
const osiApprovedLicenses = licenses.filter(l => l.keywords.includes('osi-approved')) |
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
.env | |
node_modules |
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
// @flow | |
import { h, render, Text, Fragment, Component } from "ink"; | |
import Spinner from "ink-spinner"; | |
import chalk from "chalk"; | |
import emoji from "node-emoji"; | |
import { Provider, connect } from "ink-redux"; | |
import { createStore } from "redux"; | |
const Line = ({ text }) => ( | |
<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
ARG cuda_version=9.0 | |
ARG cudnn_version=7 | |
FROM debian:stretch | |
# Install system packages | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
bzip2 \ | |
g++ \ | |
git \ | |
graphviz \ |
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 | |
# Usage: | |
# build-ios <SCHEME> <EXPORT_PLIST> | |
# | |
# SCHEME: | |
# EXPORT_PLIST: | |
set -eu | |
SCHEME=$1 |
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
class Avatar { | |
constructor (uri) { | |
this.setUri(uri) | |
Object.freeze(this) | |
} | |
setUri (uri) { | |
this.uri = uri | |
} |
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 profilify(fn, label) { | |
var displayName = label || fn.name, | |
called = 0, | |
profilified = function() { | |
var args = [].slice.call(arguments), | |
startedAt = new Date(), | |
defaults = { total: 0, times: 0, average: 0 }, | |
ret; | |
profilify._stats[displayName] = profilify._stats[displayName] || defaults |
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
node_modules/ |