Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Charlie Robbins indexzero

🎯
Focusing
Block or report user

Report or block indexzero

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@indexzero
indexzero / gather.js
Last active Aug 15, 2019
Basic puppeteer CSS coverage. Adapted from https://stackoverflow.com/a/48452214
View gather.js
const puppeteer = require('puppeteer');
const util = require('util');
const fs = require("fs");
const path = require('path');
(async (url) => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.coverage.startCSSCoverage();
await page.goto(url);
@indexzero
indexzero / output.log
Created May 30, 2019
Execution semantics for async functions not invoked with await
View output.log
executeMultiple | start
executeMultiple | end
executeMultipleAsync | start
executeMultipleAsync | end
executeMultiple | execute1
executeMultipleAsync | execute1
executeMultiple | execute2
executeMultipleAsync | execute2
executeMultipleAsync | callback
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>es6 proxy #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@indexzero
indexzero / output.log
Created Apr 17, 2019
Promise.all proof by doing
View output.log
Start | 1 | foo
Start | 2 | bar
Start | 3 | bazz
End | 2 | bar
End | 3 | bazz
End | 1 | foo
[ 'foo', 'bar', 'bazz' ]
@indexzero
indexzero / PushNotificationiOS.md
Last active May 10, 2019
Draft proposal for Push Notifications and PushNotificationiOS
View PushNotificationiOS.md

Proposal for Push Notifications and PushNotificationiOS

@salakar, @ashoat, @indexzero, @swaagie, @3rdeden, and @msluther met today to discuss this. This is the draft proposal written up during that meeting. We plan to iterate on this over the next week and then post it into a new proposal in react-native-community.

A recording of that meeting can be found below in MP4 format.

Prior art

  • Push Notification packages
    • react-native-push-notification
@indexzero
indexzero / polynotes.sh
Created Jun 27, 2018
Get all the notes about all polyfills served by polyfill.io
View polynotes.sh
#!/usr/bin/env bash
for FILE in ./*/**/config.json; do
PNAME=`dirname "$FILE"`;
PJSON=`cat "$FILE" | json notes`;
if [ ! -z "$PJSON" ]; then
echo "$PNAME $PJSON";
fi
done
View gist:ed594c02cf991c3b886f200d752ae979
question:
- https://github.com/winstonjs/winston/issues/1107
- https://github.com/winstonjs/winston/issues/1119
- https://github.com/winstonjs/winston/issues/1088
- https://github.com/winstonjs/winston/issues/1148
- https://github.com/winstonjs/winston/issues/1167
- https://github.com/winstonjs/winston/issues/1192
- https://github.com/winstonjs/winston/issues/1201
- https://github.com/winstonjs/winston/issues/1275
- https://github.com/winstonjs/winston/issues/1226
View maxfile.fail.log
test-maxsize in winstonjs/winston $ DEBUG=winston:file npx mocha test/transports/file-maxsize.test.js
winston:file ENOENT ok winstonjs/winston/test/fixtures/logs/testmaxsize.log
winston:file stat done: testmaxsize.log { size: 0 }
winston:file create stream start winstonjs/winston/test/fixtures/logs/testmaxsize.log { flags: 'a' }
winston:file create stream ok winstonjs/winston/test/fixtures/logs/testmaxsize.log
File (maxsize)
winston:file file open ok winstonjs/winston/test/fixtures/logs/testmaxsize.log
winston:file written true 0
@indexzero
indexzero / commits.md
Last active Dec 21, 2017
My thoughts on Git commit structure
View commits.md

Git commit prefixes

When possible it is preferable to break up your commits into smaller digestable chunks so that they are more readable during the peer review process. One way to accomplish this is by using a known set of git commit prefixes.

  • [api]: New apis / changes to apis
  • [test]: Update test/* files
  • [dist]: Changes to submodules, version bumps, updates to package.json
  • [tiny]: Small changes#
@indexzero
indexzero / bench.log
Created Sep 27, 2017
winston@3 gets very close to pino
View bench.log
Benchmark: ""pino"" is the fastest.
- winston1 faster than winston2 by 1.1696
- winston3 faster than winston1 by 1.5686
- bunyan faster than winston1 by 1.0245
- pino faster than winston1 by 1.8904
- winston3 faster than winston2 by 1.8347
- bunyan faster than winston2 by 1.1983
- pino faster than winston2 by 2.2109
- winston3 faster than bunyan by 1.5311
- pino faster than winston3 by 1.2051
You can’t perform that action at this time.