Skip to content

Instantly share code, notes, and snippets.

tleguede / Common-Currency.json
Created October 11, 2022 13:18 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
tleguede / difference.js
Created November 16, 2021 13:12 — forked from Yimiprod/difference.js
Deep diff between two object, using lodash
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
function difference(object, base) {
function changes(object, base) {
return _.transform(object, function(result, value, key) {
if (!_.isEqual(value, base[key])) {
tleguede /
Created January 2, 2020 14:35 — forked from td0/
Things to-do if you fuck you git up

Oh shit, git!

Git is hard: screwing up is easy, and figuring out how to fix your mistakes is fucking impossible. Git documentation has this chicken and egg problem where you can't search for how to get yourself out of a mess, unless you already know the name of the thing you need to know about in order to fix your problem.

So here are some bad situations I've gotten myself into, and how I eventually got myself out of them in plain english*.

tleguede / .htaccess
Created November 21, 2019 10:43 — forked from alch/.htaccess
Symfony full .htaccess file
# Based on
# Use the front controller as index file. It serves as fallback solution when
# every other rewrite/redirect fails (e.g. in an aliased environment without
# mod_rewrite). Additionally, this reduces the matching process for the
# startpage (path "/") because otherwise Apache will apply the rewritting rules
# to each configured DirectoryIndex file (e.g. index.php, index.html,
DirectoryIndex app.php
#DirectoryIndex app_dev.php