- 13" Macbook Pro 3.3 GHz i7 (late 2016)
- Microsoft Surface Book (2016)
- Acer K272HUL 27" monitor 2560 x 1440
- Ergotron monitor arm
- Perixx PERIMICE-712B
#!/usr/bin/env node | |
var path = require('path') | |
var parse = require('minimist') | |
var browserify = require('browserify') | |
var args = parse(process.argv.slice(2)) | |
var entries = args._ | |
var output = args.o || args.output | |
var main = args.m || args.main | |
var url = args.url || output |
npm config set loglevel http | |
npm config set progress false | |
npm config set shrinkwrap false | |
npm config set save false | |
npm config set package-lock false | |
mkdir -p ~/.config/configstore/ | |
printf '{"optOut": true,"lastUpdateCheck": 0}' > ~/.config/configstore/update-notifier-npm.json |
The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.
In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.
This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.
#!/bin/bash | |
set -e | |
set -v | |
# Get the sources | |
mkdir gn-standalone | |
cd gn-standalone | |
mkdir tools | |
cd tools |
const elType = 'div' | |
module.exports = function memoizeNode (node) { | |
var placeholder = null | |
var element = null | |
var args = null | |
return function render () { | |
const _args = arguments | |
if (!element) { |
We need an Open Source alternative to AMP.
if (window.requestAnimationFrame) { | |
function checkForJank () { // eslint-disable-line no-inner-delcarations | |
const frameStart = Date.now() | |
window.requestAnimationFrame(() => { | |
const frameDuration = Date.now() - frameStart | |
if (frameDuration > 17) { | |
Perf.log(FirstJank) | |
} else { | |
checkForJank() | |
} |
alias ..='cd ..' | |
alias ls='gls --color=auto' | |
alias ll='ls -lh --group-directories-first' | |
alias slt='open -a "Sublime Text"' | |
alias npm-offline="npm --cache-min Infinity " | |
alias publish='git push && git push --tags && npm publish' | |
alias nodeir='node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --print-opt-code --trace_hydrogen_file=hydrogen.cfg' | |
export HISTCONTROL=ignoredups | |
export PS1="\[\033[44m\] \W \[\033[49m\]\[\033[42m\]\$(__git_ps1 \" %s \")\[\033[49m\] " |
20:04 < ahdinosaur> if anyone is interested in a choo-like API where it's pull-streams all the way down, i made some helpers for `inu`: https://github.com/ahdinosaur/inux | |
20:04 < yoshuawuyts> ahdinosaur: I'm curious: how big is inu? | |
20:04 < yoshuawuyts> probably smaller than choo I'd think | |
20:05 < yoshuawuyts> well, inux would be more fair to compare I reckon but still | |
20:05 < ahdinosaur> one sec, i'll discify | |
20:05 < yoshuawuyts> ahdinosaur: I'm using this for choo https://github.com/yoshuawuyts/choo/blob/master/scripts/instrument#L24-L35 | |
20:06 < yoshuawuyts> gzip size tends to translate slightly better I find | |
20:06 < ronnross> So curious how one would use something like https://codemirror.net/ in Choo. | |
20:07 < ronnross> Would you work directly with the dome of use subscriptions to handle working with it. | |
20:07 < ronnross> Might sound like a crazy question, but when I implemented it in Elm I had to use ports and subscriptions. |