Skip to content

Instantly share code, notes, and snippets.

View tdd's full-sized avatar

Christophe Porteneuve tdd

View GitHub Profile
@tdd
tdd / web-learning-and-watchind.md
Last active December 9, 2015 13:46
Quelques ressources pour faire sa veille technique et apprendre mieux autour du web

Lisez plutôt…

cet article détaillé que j'ai écrit ensuite…

Je laisse le Gist ici pour ne pas casser vos liens, mais bon 😄

Par e-mailing/RSS/etc.

Chaque jour ou chaque semaine :

@tdd
tdd / findOrCreateByAuth.js
Created December 4, 2014 16:59
findOrCreateByAuth
userSchema.statics.findOrCreateByAuth = function findOrCreateByAuth(id, name, provider, done) {
var User = this;
User.update(
{ _id: id, provider: provider },
{ name: name, provider: provider },
{ upsert: true },
function(err, numAffected, details) {
if (err) {
return done(err);
}
@tdd
tdd / splice.js
Last active November 17, 2015 10:04
splice exo
var items;
// insertAt //////////////////////////////////
function insertAt(arr, pos, item) {
}
items = ['one', 'two', 'three'];
console.assert(insertAt(items, 1, 'yo') === 4);
@tdd
tdd / .jshintrc.js
Last active August 29, 2015 14:13
Ma config JSHint par défaut
// Configuration globale au projet de JSHint
// =========================================
//
// (Y compris celui intégré à votre EDI/éditeur, normalement)
//
// [Liste complète des options possibles](http://www.jshint.com/docs/options/)
{
// Options de restriction
// ----------------------
@tdd
tdd / partial.js
Created February 3, 2015 13:55
Partial application
function add(a, b, c) {
return a + b + c;
}
function partial(fx) {
var initial = Array.prototype.slice.call(arguments, 1);
return function() {
var args = Array.prototype.slice.call(arguments);
return fx.apply(this, initial.concat(args));
};
@tdd
tdd / INTRO.md
Last active August 29, 2015 14:15
My roadmap for NodeSchool workshops
@tdd
tdd / angular-just-say-no.md
Last active November 18, 2022 20:47
Angular: Just Say No

Angular: Just say no

A collection of articles by AngularJS veterans, sometimes even core committers, that explain in detail what's wrong with Angular 1.x, how Angular 2 isn't the future, and why you should avoid the entire thing at all costs unless you want to spend the next few years in hell.

Reason for this: I'm getting tired of having to explain to everyone, chief of which all the indiscriminate Google Kool-Aid™ drinkers, why I have never believed in Angular, why I think it'll publicly fail pretty soon now (a couple years), and why it's a dead end IMO. This gist serves as a quick target I can point people to in order not to have to parrot / compile the core of the articles below everytime. Their compounded reading pretty much captures 99% of my view on the topic.

This page is accessible through http://bit.ly/angular-just-say-no and http://bit.ly/angularjustsayno, btw.

@tdd
tdd / git-bash-prompt.bash
Created July 16, 2015 09:54
Bash prompt configuration for Git’s built-in prompt features
# STEP 1: ENSURE COMPLETION AND PROMPT FUNCTION ARE LOADED
# ========================================================
# OPTION 1: If on OSX using Homebrew:
#
# source $(brew --prefix)/etc/bash_completion.d/git-prompt.sh
# source $(brew --prefix)/etc/bash_completion.d/git-completion.bash
# OPTION 2: If on OSX using built-in Git (also works on ZSH):
#

Keybase proof

I hereby claim:

  • I am tdd on github.
  • I am porteneuve (https://keybase.io/porteneuve) on keybase.
  • I have a public key whose fingerprint is 4158 4B60 C64C BEC9 D680 C01E F68C 6547 0C78 E0E5

To claim this, I am signing this object:

@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>