Skip to content

Instantly share code, notes, and snippets.

View ehsavoie's full-sized avatar

Emmanuel Hugonnet ehsavoie

View GitHub Profile
//usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS info.picocli:picocli:4.2.0
//DEPS org.eclipse.jgit:org.eclipse.jgit:5.8.1.202007141445-r
import org.eclipse.jgit.api.ListBranchCommand;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
@ehsavoie
ehsavoie / convert.js
Created March 28, 2019 09:04
Optimize SVG data
var svgToMiniDataURI = require("mini-svg-data-uri");
var fs = require('fs');
var http = require('http');
var https = require('https');
function hasHeader(header, headers) {
var headers = Object.keys(headers || this.headers)
, lheaders = headers.map(function (h) {return h.toLowerCase()})
;
@ehsavoie
ehsavoie / mini-svg-data-uri
Created March 27, 2019 08:05
JS script to minimize an SVG image
var svgToMiniDataURI = require("mini-svg-data-uri");
var http = require('http');
var https = require('https');
const url = process.argv[2];
var client = http;
if (url.startsWith("https")){
client = https;
}
@ehsavoie
ehsavoie / keybase.md
Created April 19, 2015 15:33
keybase.md

Keybase proof

I hereby claim:

  • I am ehsavoie on github.
  • I am ehsavoie (https://keybase.io/ehsavoie) on keybase.
  • I have a public key whose fingerprint is C20B C9F9 5BF2 1D8F C606 9D74 0052 EC74 6764 36E0

To claim this, I am signing this object: