Skip to content

Instantly share code, notes, and snippets.

View eunomie's full-sized avatar

Yves Brissaud eunomie

View GitHub Profile

Buns

Recette pour 15-16 pains à hamburger. Il est aisé de la diviser par 2 si besoin de plus petites quantités. Il est aussi possible de diviser les boules en 2 pour en faire des petits, pour les enfants ou l'apéro.

Ingrédients

{
"service": {
"name": "node-exporter",
"port": 9100
}
}
@eunomie
eunomie / README.md
Created April 27, 2017 09:44
How to send containers log to ELK using gelf log driver

Send docker logs to ELK through gelf log driver

There's so many way to send logs to an elk... logspout, filebeat, journalbeat, etc.

But docker has a gelf log driver and logstash a gelf input. So here we are.

Here is a docker-compose to test a full elk with a container sending logs via gelf.

@eunomie
eunomie / taylor.elm
Last active February 26, 2016 06:22
import List exposing (sum, map, foldl)
pow : Float -> Float -> Float
pow num p =
if p == 0 then
1
else if p > 0 then
num * (pow num (p - 1))
else
1 / num * (pow num (p + 1))
@eunomie
eunomie / README.md
Last active February 11, 2016 11:39
mirabegit: git quetsche --mirabelle
  • put git-quetsche in $PATH
  • run git quetsche --mirabelle => execute git fetch --prune
@eunomie
eunomie / get
Created April 22, 2015 12:24
Some Android shortcuts
#!/bin/sh
adb pull "/data/local/tmp/$1.mp4"
adb shell rm "/data/local/tmp/$1.mp4"

Keybase proof

I hereby claim:

  • I am eunomie on github.
  • I am eunomie (https://keybase.io/eunomie) on keybase.
  • I have a public key ASCIvP3D0xM_hpu_dFfi123J1VnXM-K0GfIo9BC_pRcYAQo

To claim this, I am signing this object:

How To TCP NAT Traversal using Node.js and a STUN Server

With the scarecity of IPv4 addresses, and IPv6 still not available at large, NAT traversal is becoming a necessity. Especially with the generalisation of Carrier-grade NATs that you can find on mobile connections. Even with IPv6 you may suffer NAT66. Imagine your mobile device that gets only a single Ipv6 address, and you want to share it on your computer.

The solution might be in a decentralized protocol for address attribution such

@eunomie
eunomie / change_wallpaper_all_desktops.rb
Created January 30, 2014 09:25
Prend une image aléatoirement dans le répertoire IMAGES et applique là à tous les spaces puis redémarre le Dock pour que ce soit pris en compte. Initialement il faut que tous les spaces aient soient configurés avec une image (pas la conf par défaut).
#!/usr/bin/env ruby
require "sqlite3"
DB_LOC = File.join(ENV["HOME"], "Library/Application Support/Dock/desktoppicture.db")
DB = SQLite3::Database.new(DB_LOC)
IMAGES = File.join(ENV["HOME"], "Pictures/desktops/2560x1600","*")
new_image = Dir[IMAGES].sort_by{ rand }[0]
new_image.sub!(ENV["HOME"],"~")
/* Javascript plotting library for jQuery, version 0.8.2-alpha.
Copyright (c) 2007-2013 IOLA and Ole Laursen.
Licensed under the MIT license.
*/
// first an inline dependency, jquery.colorhelpers.js, we inline it here
// for convenience