Skip to content

Instantly share code, notes, and snippets.

View o0101's full-sized avatar
🏖️
Netscaping

Cris o0101

🏖️
Netscaping
View GitHub Profile
@o0101
o0101 / tester.js
Created November 5, 2018 10:32 — forked from freedmand/tester.js
JavaScript unit testing in under 30 lines
const PASS = ['32']; // green
const FAIL = ['31', '1']; // red, bold
function logStyle(ansiEscapeCodes, text) {
console.log(`\x1b[${ansiEscapeCodes.join(';')}m${text}\x1b[0m`);
}
class Tester {
constructor() {}
@o0101
o0101 / todo.md
Last active August 28, 2020 10:28
rw todo november 7 2018

Today

  • Test WCE
    • ISSUE with creating a user locally on API / DB to allow testing.
    • Get an access token for the DB.
    • Test API can sort channels by these fields (maybe use API explorer)
    • update UI defaults (the defaults in API have already been updated) for channel to have platform: stb and group: leads and subscribers, when no data for platform and UG (say, old channel) is provided by API.
    • Test API can sort channels by these fields (maybe use API explorer)

Yesterday

@o0101
o0101 / memory.json
Last active August 28, 2020 10:28
[gistbarn][crislin2046][memory]
{
"followers": [
{
"login": "rubys",
"id": 4815,
"node_id": "MDQ6VXNlcjQ4MTU=",
"avatar_url": "https://avatars1.githubusercontent.com/u/4815?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rubys",
"html_url": "https://github.com/rubys",
/** very simple spreadsheet idea. try 1 **/
function link(cell, transform) {
let el;
return R`
${key:cell.key}
<td class=cell>
<input bond=${e => el = e} input=${el.value = transform(el.value)}>
</td>
`;
// select widget
// window open
// alert / confirm / prompt
// permission request
the places where the browser platform bleeds into the "rest of the world" / the "outside world" / the "other platforms" / native / etc
How to make a ?
- better native?
Use browser native,
window.open, select, alert, confirm, prompt, file, print.
OR
canvas with circles no overlap
each circle has text or image inside
clicking a circle moves it to page center and keeps other circles in same position around it
scrolling vertically we move over regions of circles chronologically more distant in time
@o0101
o0101 / hiimgui.js
Last active August 28, 2020 10:27
hiimgui tests -hypertext integrated immediate mode gui
// api tests
function * on() {
while(true) {
select(
option('plan1'),
option('plan2'),
option('plan3')
);
const [select, input] = yield 'input';
@o0101
o0101 / r.js
Created September 6, 2019 02:31
Secret Brutal Code
// r.js
// imports
import {CODE,BROWSER_SIDE} from './common.js';
import {S} from './ssr.js';
import T from './types.js';
// backwards compatible alias
const skip = markup;
const attrskip = attrmarkup;
@o0101
o0101 / README.md
Last active August 28, 2020 10:26
Theorem∎ X Cris September 7 2019 Test

How to run this program?

Download the 3 files: index.html, flatten.js, and tests.js into 1 directory and open index.html with a web browser.

Open the JavaScript console to see test output.