Skip to content

Instantly share code, notes, and snippets.

@pbellon
pbellon / lp_t1.src.js
Created May 10, 2024 09:43
Hackmud lockpick script (t1)
function(context, {t}) { // t:#s.<user>.<script>
// adapted from: https://github.com/carterjones/hackmud/blob/master/hacking/lockpick.js
// to minify with `hsm golf lp_t1.src.js` cmd
var args = {},
s = ([_]) => _.split(","), // s util to create array via string => less chars !
ez_commands = s`unlock,release,open`, // EZ_xx lock commands
ez_primes = s`2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97`, // ez_prime
l0cket_values = s`6hh8xw,cmppiq,sa23uw,tvfkyq,uphlaw,vc2c7q,xwz7ja`, // l0cket values
colors = s`red,lime,blue,orange,green,purple,yellow,cyan`, // colors
type,
// ==UserScript==
// @name RedditPlaceExporter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Add an export button next to your user name in top navigation bar
// @author Crevetolog
// @match https://hot-potato.reddit.com/embed*
// @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com
// @grant none
// ==/UserScript==
We can't make this file beautiful and searchable because it's too large.
DATE ARRET;CDGI;QUARTIER;TYPE DE VOIE;PREFIXE de VOIE;NOM de VOIE;Libellé VOIE;CVOIE;HISTORIQUE;LARGEUR;LONG;DETAIL;ARRONDISSEMENT;STATUT PRESUME;DEBUT;FIN
;0598;Saint-Ambroise.;cité;de l';avenir;cité de l'Avenir;0574;;3.0;96.0;"Nota.~ Voie destinée à être baillée à la RIVP.
Création. ~ Créée en 1864.
Classement, alignements (retenus au POS et non repris au PLU) et nivellement. ~ Arr. mun. du 11 mai 1993.
Déclassement. ~ Délib. mun. du 15 et 16 novembre 2004 sur la totalité de l'emprise.";XIe;voie privée;boulevard de Ménilmontant, 121.;en impasse.
;X131;Sainte-Marguerite.;voie;;b/11;voie B/11;Y131;;10.0;57.0;Assainissement. ~ Arr. mun. du 18 février 1986.;XIe;voie privée;rue de Charonne, 144.;en impasse.
1897-10-06T01:00:00+01:00;0537;Folie-Méricourt.;rue;;auguste barbier;rue Auguste Barbier;0513;"Orig. du nom. ~ Henri Auguste Barbier (1805-1882), poète français.
Historique. ~ Précédemment rue Provot.";10.0;110.0;"Classement, alignements (non retenus au POS et non repris au PLU) et nivellement. ~ Déc. du 18 j
@pbellon
pbellon / strFormat.js
Last active September 23, 2018 17:35
strFormat.js
/**
* Format a string based on mapping object
* Usage:
* strFormat('{replace} my {stuff} by another {stuff}', { replace: "you should replace", stuff: "blob" })
* will return:
* "you should replace my blob by another blob"
*/
var strFormat = (str, cfg) => {
var pattern = Object.keys(cfg).map(k => `{${k}}`).join('|');
var re = new RegExp(pattern,"gi");
@pbellon
pbellon / .block
Last active October 13, 2017 08:27
Stacked Bars
license: mit
@pbellon
pbellon / .block
Created October 12, 2017 15:54
Grouped bar chart
license: mit
@pbellon
pbellon / .block
Last active October 12, 2017 16:22
Map Isere
license: mit
@pbellon
pbellon / .block
Last active July 20, 2017 10:05
Links with bezier curves
license: mit
@pbellon
pbellon / .block
Created July 18, 2017 10:48
Random pseudo-circles concave hull
license: mit
@pbellon
pbellon / .block
Created July 11, 2017 16:18
fresh block
license: mit