Skip to content

Instantly share code, notes, and snippets.

@cesque
cesque / loophero_river.js
Created March 14, 2021 01:22
test loop hero optimal river generation
let size = {
width: 5,
height: 12,
}
let directions = [
{ x: 1, y: 0, },
{ x: -1, y: 0, },
{ x: 0, y: 1, },
{ x: 0, y: -1, },
const chalk = require('chalk')
const { default: Mod } = require('./models/mod')
let dataRepo = '../data/'
const mods = arrayify(require('/data/mods.min.json'))
let baseItems = arrayify(require('/data/base_items.min.json'))
let translations = require('./data/stat_translations.min.json')
@cesque
cesque / gist:96314ff533c969416824c059c6a43197
Created April 27, 2018 16:39
looping through elements of nested array (attempt 1)
let obj = {
something: Array(10).fill().map(x => {
return { somethingelse: Array(10).fill().map((y,i) => i) }
})
}
function loop2(obj, property, fn) {
for(let x of obj[property]) fn(x)
}
AARCH
ACCRA
ACONY
ACSIN
ADDEL
ADELL
ADENA
ADYMS
ADYOS
AFTON
class Airspace {
constructor() {
this.width = 1000
this.height = 1000
this.nodes = [
/*{
id: 'MNS5',
name: 'Mensae V',
position: {
happy birthday:
ȃng thiðɜb eя ši
/ɑŋ ˈθiðɜb ej ʃi/
ȃng thiðɜb eя ši
/ɑŋ ˈθiðɜb ej ʃi/
bilzez kɜ bithɜbšu thiðɜb
/ˈbilzez kɜ biθɜbʃu ˈθiðɜb/
ȃng thiðɜb eя ši
/ɑŋ ˈθiðɜb ej ʃi/
input sentence: the dog that is big loves me, and i love him
output:
the dog that be big love i and i love he
/ʒef jat͡st͡ʃuɲu doz vo kupgu ŋanwo ʍa met͡suʃ ʍa ŋanwo gav /
i : ʍa
he : gav
she : wod͡ʒ
@cesque
cesque / dictionary.txt
Created January 24, 2017 01:08
randomly generated dictionary
i : siʃemsu
he : ɲamʍud͡zʍet
she : jajtit͡ʃʍas
we : d͡ʒiʃ
you : ɲixʎozvuɹ
dog : ɲopfide
cat : joʃked͡z
human : soʍ
book : pi
house : zet͡ʃnivsuw
(function() {
$ = jQuery;
var total = 0;
var a = $('tr.wallet_table_row').filter(function() {
var t = $(this).find('.wht_type > div:nth-child(1)').text();
return $(this).find('.wht_items').text().indexOf('Wallet') == -1 &&
(t === 'Purchase'); // ! || t === 'In-Game Purchase'
}).map(function() {
return $(this).find('.wht_total').text().trim();
})
#include "keymap_common.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP( /* qwerty */
ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC,
FN6, A, S, D, F, G, H, J, K, L, SCLN, ENT,
LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,
LCTL, CAPS, LALT, QUOT, FN2, SPC, FN1, SLSH, DEL, PSCR, TAB),
[1] = KEYMAP( /* dvorak */