This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const esprima = require("esprima"); | |
const escodegen = require("escodegen"); | |
const fs = require("fs"); | |
const minify = require("terser"); | |
const content = fs.readFileSync("./build.ts.js", "utf8"); | |
const wrapper = fs.readFileSync("./builder/require.js", "utf8"); | |
let ast = esprima.parseScript(content); | |
function walk(o, cb) { | |
if (o.type) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const test = struct { | |
a: String or Number, | |
b: Number, | |
c: (Number or String) or Error | |
} | |
const user = struct { | |
email: String, | |
password: String, | |
username: String | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const isObserve = Symbol("is-obObjserve"); | |
const dispatch = Symbol("observe-dispatch"); | |
const psym = Symbol("observe-data"); | |
const observeWatch = Symbol("observe-watch"); | |
export default class Observe { | |
constructor(obj) { | |
this[psym] = {}; | |
this[psym]._raw = obj; | |
this[psym]._watchers = []; | |
const keys = Object.keys(obj); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const gaf = require("get-all-files"); | |
const path = require("path"); | |
const fs = require("fs"); | |
const fileHash = require("md5-file"); | |
const dir = process.cwd(); | |
(async function () { | |
if (process.argv.includes("restore-last-snap")) { | |
const backup = require("./backup-manifest.json"); | |
let keys = Object.keys(backup); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NumberType { | |
static read(buf) { | |
return buf.readNextNumber(); | |
} | |
static write(buf, value) { | |
buf.writeNumber(value); | |
} | |
} | |
class BigIntType { | |
static read(buf) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class nt{static r(a){return a.z()}static w(a,b){a.y(b)}}class it{static r(a){const b=!!a.x(),c=a.z();let d="";for(let b=0;b<c;b++)d+=a.x().toString(2);return b?BigInt(-1)*BigInt("0b0"+d):BigInt("0b0"+d)}static w(a,b){b<BigInt(0)?(b=BigInt(-1)*b,a.w(1)):a.w(0);let c=b.toString(2).split(""),d=[],e=0;for(;c.length;)e++,"0"===c[0]?(d.push(0),c.shift()):d.push(parseInt([c.shift(),c.shift(),c.shift(),c.shift(),c.shift(),c.shift(),c.shift(),c.shift()].join(""),2));a.y(e),a.w(...d)}}class ot{constructor(a){this.z=a,this.y=Object.keys(this.z)}r(a){let b={};for(let c=0;c<this.y.length;c++)b[this.y[c]]=this.z[this.y[c]].r(a);return b}w(a,b){for(let c=0;c<this.y.length;c++)this.z[this.y[c]].w(a,b[this.y[c]])}}class at{constructor(a){this.s=a}r(a){let b=[],c=a.z();for(let d=0;d<c;d++)b.push(this.s.r(a));return b}w(a,b){a.y(b.length);for(let c=0;c<b.length;c++)this.s.w(a,b[c])}}class st{static r(a){let b=a.z(),c="";for(let d=0;d<b;d++)c+=String.fromCharCode(a.x());return c}static w(a,b){a.y(b.length),a.w(...b.split("").map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import FW3 from "../yourframework"; | |
let bg = "#FF00FF"; | |
let primary = "#0FF000"; | |
let active = "#000FF0"; | |
export function Idk() { | |
const [bgColor, setBgColor] = FW3.useState(bg); | |
const [primaryColor, setPrimaryColor] = FW3.useState(primary); | |
const [navActiveColor, setNavActiveColor] = FW3.useState(active); | |
return <div> | |
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
const addStyleSnippet = (() => { | |
const styles = document.createElement("style"); | |
document.head.appendChild(styles); | |
return function(snippet) { | |
styles.innerHTML += snippet; | |
}; | |
})(); | |
const UTILSTORE = { templates: {}, toRender: [] }; | |
class NodeValuePointer$attribute { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileNotFoundException; | |
import java.io.PrintWriter; | |
import java.util.Scanner; | |
/** | |
* Will output an html file to disk containing the code needed for a resume | |
* based off of user input. | |
* | |
* still need to do another pass over it and revise my comments a bit, there is a good ammount of 3am code in this. | |
* | |
* @author Ian Senne |
OlderNewer