Skip to content

Instantly share code, notes, and snippets.

View amatiasq's full-sized avatar

A. Matías Quezada amatiasq

View GitHub Profile
@amatiasq
amatiasq / fable-repl.css
Created April 18, 2020 15:58
Created with Fable REPL
html, body {
margin: 0;
padding: 0;
}
const QUOTE = '"';
const SEPARATOR = ',';
const ROW_SEPARATOR = '\n';
export function parseCsv(content: string) {
const len = content.length;
const data = [];
let row = [];
let isEscaped = false;
let value = '';
@amatiasq
amatiasq / 1. Leyur.txt
Last active February 24, 2021 09:25
Leyur
CRASH! Pude escucharlo perfectamente. CRASH! Hizo mi corazón cuando Cintia lo tiro a través del bosque.
- Cómo...? - pregunte con el alma en un hilo, al borde del llanto.
- Ya no te soporto mas, oíste bien, eres una puta, vete de aquí, no te quiero cerca mio.
- pero Cin...
Un movimiento veloz y... dos centímetros, eso fue la distancia que separaba la daga de Cintia de mi nariz.
- Ya me has oido, fuera de aquí o te abro en canal.
@amatiasq
amatiasq / EcmaScript 2020.js
Last active February 24, 2021 09:20
EcmaScript
#!/usr/bin/env node
const meUrl = import.meta.url;
const icon = await fetch(new URL('./icon.png', meUrl));
const element = import.meta.scriptElement ?? { remove() {} };
element.remove();
// Fields & privates
const a = new Life();
a.pos = new Vector(10, 10);
a.setParameter(Parameter.ENERGY, 100);
a.setParameter(Parameter.WEIGHT, 1);
a.setParameter(Parameter.FOOD, x => x.hasParameter(Parameter.IS_PLANT));
a.addSense(new Sight({ radius: 10, angle: 270, precision: 1 }))
a.addSense(new Hearing({ radius: 1, angle: 360, })
button.click(); // nothing
event = document.createEvent ('MouseEvents');
event.initEvent('click', true, true);
button.dispatchEvent(click) // nothing
// here I discover `event.isTrusted`
event = document.createEvent ('MouseEvents');
event.initEvent('click', true, true);
const DEFAULT_VERSION = 0;
export class ClientStorage {
constructor(key, {
isSessionOnly = false,
version = DEFAULT_VERSION,
} = {}) {
this.key = key;
this.version = version;
this.storage = isSessionOnly ? sessionStorage : localStorage;
choco install spotify slack steam greenshot nodejs docker-desktop vscode sublimetext3 notepadplusplus gitkraken visualstudio2017community octave blender magicavoxelviewer -y
@amatiasq
amatiasq / CSVReader.js
Created November 9, 2018 11:10
CSV Parsers
const fs = require('fs');
const { promisify } = require('util');
const fs_open = promisify(fs.open);
const fs_read = promisify(fs.read);
const fs_close = promisify(fs.close);
let debug;
try {
debug = require('debug');
} catch(error) {

Tower Defense

  • Building
    • Currency
    • Attacks
    • Waves

Shooter

  • Weapons
  • Bullets
  • Enemies