Skip to content

Instantly share code, notes, and snippets.

View zaach's full-sized avatar
🎯
Focusing

Zach Carter zaach

🎯
Focusing
View GitHub Profile
@zaach
zaach / turing-types.ts
Created November 26, 2020 05:29
turing machine simulator using TS types
// Natural Numbers
interface Zero {
isZero: true;
}
interface Successor<N extends Nat> {
prev: N;
isZero: false;
}
type Nat = Zero | Successor<Nat>;
@zaach
zaach / ackermann.ts
Last active November 26, 2020 22:10
Compute the Ackermann function using TS types
// Natural Numbers
interface Zero {
isZero: true;
}
interface Successor<N extends Nat> {
prev: N;
isZero: false;
}
type Nat = Zero | Successor<Nat>;
yarn test
yarn run v1.7.0
$ react-scripts test --env=jsdom --runInBand
2018-07-10 11:10 node[865] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2018-07-10 11:10 node[865] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2018-07-10 11:10 node[865] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
events.js:167
throw er; // Unhandled 'error' event
^
0x2b65995251180A285caDE992Bfc56B3c7F11CE98
zachbook ~/moz/fxa-content-server (update-convict)$ npm shrinkwrap
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/Users/zcarter/.nvm/v0.10.26/bin/npm" "shrinkwrap"
npm ERR! node v0.10.26
npm ERR! npm v2.1.3
npm ERR! Problems were encountered
npm ERR! Please correct and try again.
npm ERR! missing: ansi-regex@^0.2.0, required by has-ansi@0.1.0
npm ERR! missing: ansi-regex@^0.2.1, required by strip-ansi@0.3.0
diff --git a/lib/lookup.js b/lib/lookup.js
index c6e967d..7192e5e 100644
--- a/lib/lookup.js
+++ b/lib/lookup.js
@@ -19,7 +19,7 @@ const DEFAULT_PORTS = {
// like https.get() but transparently supports the
// $https_proxy and $no_proxy environment variables.
var getWithTransparentProxying = function(options, cb) {
- var httpmod = https;
+ var httpmod = http;
diff --git a/lib/lookup.js b/lib/lookup.js
index c6e967d..7192e5e 100644
--- a/lib/lookup.js
+++ b/lib/lookup.js
@@ -19,7 +19,7 @@ const DEFAULT_PORTS = {
// like https.get() but transparently supports the
// $https_proxy and $no_proxy environment variables.
var getWithTransparentProxying = function(options, cb) {
- var httpmod = https;
+ var httpmod = http;
> fxa-oauth-server@0.0.0 start /Users/zcarter/moz/fxa-oauth-server
> grunt server --node-env=dev
Running "nodemon:dev" (nodemon) task
[nodemon] v1.0.17
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node bin/server.js`
{"level":40,"levelname":"INFO","hostname":"zachbook","name":"fxa.bin.server","pid":6975,"time":"2014-05-07T01:03:55.874Z","v":1,"msg":"Server started at: http://127.0.0.1:9010"}
### Keybase proof
I hereby claim:
* I am zaach on github.
* I am zii (https://keybase.io/zii) on keybase.
* I have a public key whose fingerprint is 25BD 0751 ACE8 7878 4D4E 7A2A 9CFB E9E8 B735 4118
To claim this, I am signing this object:
@zaach
zaach / list.js
Last active August 29, 2015 13:56
#!/usr/bin/env node
var json = require('./languages_all');
Object.keys(json).forEach(function(key) {
console.log(key);
});