Skip to content

Instantly share code, notes, and snippets.

View zootella's full-sized avatar
🏔️

Kevin Faaborg zootella

🏔️
View GitHub Profile
/*
2024jan11 demo:
-all local
-pages:dev
-react and vue
-console.log client and server
$ npm create cloudflare@latest
[1: the world as it is today]
regular identities are controlled by corporations:
https://twitter.com/jamieoliver
https://linktr.ee/jamieoliver
https://www.youtube.com/user/JamieOliver
https://www.youtube.com/watch?v=hTn8Uh1m0hg (11-character base 64 hash value)
<!doctype html>
<html>
<head>
<title>blah4</title>
<style>
body {
max-width: 680px;
margin: 0 auto;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>spin5</title>
<script src="http://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="http://cdn.jsdelivr.net/bluebird/3.5.0/bluebird.min.js"></script>
</head>
<body>
stream workshop ideas
[big file]
read a small file into memory to get its size
read a big file into memory, see that break
fix it with a stream that counts the bytes as they come in
[zip]
zip a file
unzip a file
console.log("file\\");
var test = require("tape");
var tap_spec = require("tap-spec");
var tap_json = require("tap-json");
var stream_buffers = require("stream-buffers");
//run these like "$ node popquiz.js 1" and so on
var n = process.argv[2];
console.log("file\\");
var test = require("tape");
var tap_spec = require("tap-spec");
var tap_json = require("tap-json");
var stream_buffers = require("stream-buffers");
//run these like "$ node popquiz.js 1" and so on
var n = process.argv[2];
//1. native operators, best looking but depends on primitive types or operator overloading
if (1 + 5 - 2 <= 9) return;
//2. methods, correct java-inspired design employed by most modules
if (int(1).add(5).subtract(2).lessThanOrEqualTo(9)) return;
//3. first custom design, works alongside 2
if (int(1)._("+", 5)._("-", 2)._("<=", 9)) return;
var platformChildProcess = require("child_process");
function demo(name) { return process.argv[2] == "demo" && process.argv[3] == name; }
var log = console.log;
function trim(d) { return (d+"").trim(); }
/*
goals