Skip to content

Instantly share code, notes, and snippets.

View tdd's full-sized avatar

Christophe Porteneuve tdd

View GitHub Profile
@tdd
tdd / conf-best-practices.markdown
Last active March 23, 2020 18:03
A list of best-practices for conference organizers. Especially useful for first-time organizers, I guess.

Website

Things your website should clearly state / make accessible:

  • The core focus of your conf
  • Your core values
  • The (precise) location
  • The dates
  • Your programme, complete with speakers and their bios/pics
@tdd
tdd / index.html
Created October 19, 2015 09:29
HTML pour formation Git
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Formation Git</title>
</head>
<body>
<h1>Formation Git</h1>
</body>
</html>
@tdd
tdd / falcons.json
Created January 14, 2020 09:00
Dassault Falcon "JSON" file for mongoimport in MongoDB training session
{ "model": "Falcon 20/200", "intro": 1963, "eol": 1988, "range_nm": 1810, "tags": ["original"] }
{ "model": "Falcon 10/100", "intro": 1970, "eol": 1989, "range_nm": 1920, "tags": ["scaled-down"], "source_model": "Falcon 20/200" }
{ "model": "Falcon 30", "intro": 1973, "eol": 1975, "range_nm": 1150, "tags": ["scaled-up", "prototype"], "source_model": "Falcon 20/200" }
{ "model": "Falcon 40", "intro": 1973, "eol": 1975, "range_nm": 1150, "tags": ["scaled-up", "us-only"], "source_model": "Falcon 20/200" }
{ "model": "Falcon 50", "intro": 1976, "eol": 2008, "range_nm": 3220, "tags": ["trijet"], "source_model": "Falcon 20/200" }
{ "model": "Falcon 900", "intro": 1984, "range_nm": 4750, "tags": ["scaled-up", "trijet"], "source_model": "Falcon 50" }
{ "model": "Falcon 2000", "intro": 1993, "range_nm": 4150, "tags": ["scaled-down", "twinjet"], "source_model": "Falcon 900" }
{ "model": "Falcon 7X", "intro": 2005, "range_nm": 5950, "tags": ["trijet"], "source_model": "Falcon 900" }
{ "model": "Falcon 8X", "intro": 2016
@tdd
tdd / settings.json
Created December 5, 2018 14:41
Disable Pipe key for Bookmarks on OSX VS Code
{
"key": "shift+alt+l",
"command": "-bookmarks.expandSelectionToNext",
"when": "editorTextFocus"
},
@tdd
tdd / reasons-i-hate-your-postmaster.md
Created March 13, 2017 10:37
Don’ts of corporate e-mail address management

I keep having issues with client e-mail addresses that seem to have been intentionally designed by their IT dept to maximize error rates. I need to vent a bit, so here goes. Star if you can relate 😉

8 reasons why I want to punch your e-mail address policy authors in the face

E-mail addresses at your company…

  1. …don't use the full first or last names, making input confusing and error-prone  - they enforce a max length on one or more naming parts (e.g. with 7 max chars for last name, "David Somewhat" becomes dsomewha@, which looks and feels like a typo, and can't be guessed from prior conversation with John Foobar’s jfoobar@)  - they use oh-so-1990 trigrams (e.g. John Foobar is either jfo or jfr), which is collision-prone and results in numerous irregular overrides  - they separate the first and last name, but abbreviate one of them (e.g. d.somewhat instead of dsomewhat), which looks fugly.
@tdd
tdd / es2015-proxies-array-negative-indices.js
Created May 25, 2016 08:56
Negative indices on arrays using ES2015 proxies
function yay(array) {
return new Proxy(array, {
get (target, property, receiver) {
if (property < 0) {
property = target.length + Number(property)
}
return Reflect.get(target, property, receiver)
}
})
}
"ensure_newline_at_eof_on_save": true,
"tab_size": 2,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
@tdd
tdd / e-marchand-pourrissime.md
Created July 15, 2013 19:47
En 2013, un site e-marchand pourrissime

Pour le LULZ ce soir, je teste le site marchand de la filiale FR d'une grande enseigne internationale. J'ai été tellement ébahi par le degré de fail que je me suis senti obligé de faire un compte-rendu, un tweet n'aurait pas rendu justice à un tel niveau de moisitude…

Ergonomie et mise en page

  • Le plus grand foutoir partout, avec une palme indétrônable pour tous les formulaires
  • Tous les Call-To-Action sont des textes sans mise en avant
  • Des fautes de frappe partout
  • En récap de commande (à consulter manuellement, affiché nulle part automatiquement après le paiement), les lignes de commande sont du texte brut au format "libellé quantité prix", tout collé. Tu as payé un produit "Toto" à 2,20€ ? Ça affiche en petit "Toto 1 2,20€", et donc tu lis "Toto 12,20€" et tu paniques :-)
  • Des tas de pavé de texte en Serif 10px…
@tdd
tdd / throttle.js
Created June 6, 2013 16:38
Exo de programmation fonctionnelle à trous : Throttling
Function.prototype.throttle = function(/* … */) {
var f = this;
// …
return function() {
// …
return f.apply(this, arguments);
};
};
@tdd
tdd / backbone-localstorage-sync.js
Created January 30, 2013 13:47
Quick run-through of syncing a Backbone.Collection with a localStorage cache
// Assumes http://brian.io/lawnchair/ and http://backbonejs.org/
var collection = new MyCollection();
var localStore = new Lawnchair({ name: 'my-cache' }, $.noop);
// First load from the cache, then fetch
function initialLoad() {
localStore.all(function(items) {
collection.reset(items, function() {
collection.fetch();