Skip to content

Instantly share code, notes, and snippets.

View gflandre's full-sized avatar

Guillaume Flandre gflandre

  • GoCardless
  • London
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Don't break a for loop</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@gflandre
gflandre / total_project_additions_deletions_2016.sh
Last active January 3, 2017 16:10
Get the total number of lines added and deleted in your repo in 2016
# Get the total number of lines added and deleted in your project in 2016
git log --numstat --pretty="%H" --since="2015-12-31" --until="2017-01-01" --branches="master" | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'

Keybase proof

I hereby claim:

  • I am gflandre on github.
  • I am gflandre (https://keybase.io/gflandre) on keybase.
  • I have a public key whose fingerprint is 05EC 16F1 62AB DE61 9E59 5E97 4DEB 3F39 4E85 CC60

To claim this, I am signing this object:

@gflandre
gflandre / robot.js
Created December 18, 2012 13:20
LeFighter
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
//robot.clone();
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);