Skip to content

Instantly share code, notes, and snippets.

View indexzero's full-sized avatar
🗽
✊ Fist in the air in the land of hypocrisy

Charlie Robbins indexzero

🗽
✊ Fist in the air in the land of hypocrisy
View GitHub Profile
@indexzero
indexzero / output.log
Created May 30, 2019 18:33
Execution semantics for async functions not invoked with await
executeMultiple | start
executeMultiple | end
executeMultipleAsync | start
executeMultipleAsync | end
executeMultiple | execute1
executeMultipleAsync | execute1
executeMultiple | execute2
executeMultipleAsync | execute2
executeMultipleAsync | callback
@indexzero
indexzero / index.html
Created April 17, 2019 08:00 — forked from jjgonecrypto/index.html
es6 proxy #jsbench #jsperf (http://jsbench.github.io/#531652a2edfa806a5014558bafe6eb0e) #jsbench #jsperf
<!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 April 17, 2019 06:33
Promise.all proof by doing
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 01:20
Draft proposal for Push Notifications and PushNotificationiOS

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 June 27, 2018 13:57
Get all the notes about all polyfills served by polyfill.io
#!/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
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
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 December 21, 2017 14:05
My thoughts on Git commit structure

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 September 27, 2017 05:37
winston@3 gets very close to pino
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
@indexzero
indexzero / i18n-time-intervals.js
Created June 29, 2017 18:33
Generate a 24 hour range of 30-minute time intervals that are i18n compatible
let items = [];
for (var hour = 0; hour < 24; hour++) {
items.push([hour, 0]);
items.push([hour, 30]);
}
const date = new Date();
const formatter = new Intl.DateTimeFormat('en-US', {
hour: 'numeric',
minute: 'numeric',