Skip to content

Instantly share code, notes, and snippets.

View tpoisseau's full-sized avatar
🤝
New Zakodium Fullstack Developer

tpoisseau tpoisseau

🤝
New Zakodium Fullstack Developer
View GitHub Profile
@tpoisseau
tpoisseau / README.MD
Created October 19, 2023 09:24
dnsmasq wildcard localhost

dnsmasq wildcard localhost

# install dnsmasq
brew install dnsmasq

# edit configuration
echo "address=/.localhost/127.0.0.1" | tee /opt/homebrew/etc/dnsmasq.d/wildcard-localhost.conf

# start service
@tpoisseau
tpoisseau / itools.js
Last active June 5, 2019 09:25
Array.prototype rewrite in generator + some extra with functional tooling for pipe operator + polyfill with pipe function
/**
* Array.prototype rewrite for functional generator compatibilities + some extra
*/
function* range({start=0, stop, step=1}) {
for (let i = start; i < stop; i+=step) {
yield i;
}
}
@tpoisseau
tpoisseau / models.py
Created January 9, 2019 08:37 — forked from andialbrecht/models.py
Adds Meta option db_column_prefix that prepends a per-model prefix to db column names
# -*- coding: utf-8 -*-
# This hack adds a new Meta option "db_column_prefix". If not None all
# database columns in a model will be prepended with this prefix (the
# database columns, not the attributes). See Person model for an
# example.
#
# Issues:
# - How to set a prefix for a m2m table? - If "through" argument is
# not specified on a M2MField, Django automatically adds a model
@tpoisseau
tpoisseau / CheatCodeRegister.js
Last active November 23, 2018 11:52
listen cheat code on web page
/**
* @namespace registerCheatCode
*/
/**
* @typedef {object} registerCheatCode~api
* @property {registerCheatCode~api~on} on
* @property {registerCheatCode~api~remove} remove
* @property {registerCheatCode~api~register} register
*/