Skip to content

Instantly share code, notes, and snippets.

View oadam's full-sized avatar

Olivier Adam oadam

View GitHub Profile
@oadam
oadam / .gitattributes
Last active November 8, 2021 09:08
Gettext po file git merge driver
*.po merge=pofile
@oadam
oadam / solver.js
Last active August 23, 2017 13:09
countdown solver
#!/usr/bin/env node
"use strict";
if (process.argv.length < 4) {
console.error(
"usage :" + process.argv.slice(0, 2).join(" ") + " target num1 num2..."
);
process.exit(-1);
}
var target = parseInt(process.argv[2]);

Keybase proof

I hereby claim:

  • I am oadam on github.
  • I am oadam (https://keybase.io/oadam) on keybase.
  • I have a public key whose fingerprint is 28C8 BED6 1BBA 70BA 4F6A 7CFC 358E 8442 BCEE 4B93

To claim this, I am signing this object:

@oadam
oadam / gist:8c7758c83aa8f8c0a824
Last active March 14, 2016 14:19
JIRA worklog API
function logWork(issueId, year, month, day, timespent) {
//issueId: "RTJO-XXX"
//year: 2015, 03, 15)
//month: 3
//day: 15
//timespent: "1d"
jQuery.ajax({
url: "/rest/api/2/issue/" + issueId + "/worklog",
type: "POST",
@oadam
oadam / Delay-proxy.md
Last active November 5, 2015 12:48
Delay proxy between services

Objective

Use this if you want to simulate a delay between 2 services running on your local machine (for example between an application server and a database).

Description

We'll setup a Vagrant virtual machine running haproxy. An artifical delay can then be added using netem

Steps

#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes: