Skip to content

Instantly share code, notes, and snippets.

View LoicMahieu's full-sized avatar
🙈
🙊

Loïc Mahieu LoicMahieu

🙈
🙊
View GitHub Profile
@LoicMahieu
LoicMahieu / gist:f9b5f0109ed1d8defa89ff067c86da4c
Created April 9, 2019 09:00
Docker run with AWS env keys
docker run --rm -it \
-e AWS_ACCESS_KEY_ID=$(cat ~/.aws/credentials | grep aws_access_key_id | awk '{ split($0,a,"="); print a[2] }') \
-e AWS_SECRET_ACCESS_KEY=$(cat ~/.aws/credentials | grep aws_secret_access_key | awk '{ split($0,a,"="); print a[2] }') \
node:10 \
bash
@LoicMahieu
LoicMahieu / gist:f0c6fe1879c6ddf233a295af00e81dcc
Created August 20, 2018 08:41
Redis - delete keys matching pattern
EVAL "return redis.call('del', unpack(redis.call('keys', ARGV[1])))" 0 prefix:*
@LoicMahieu
LoicMahieu / docker_cheatsheet.md
Created November 10, 2015 10:32
Docker cheatsheet

Stats all containers

docker stats $(docker inspect -f "{{ .Name }}" $(docker ps -aq))

Keybase proof

I hereby claim:

  • I am LoicMahieu on github.
  • I am loicmahieu (https://keybase.io/loicmahieu) on keybase.
  • I have a public key whose fingerprint is E3A6 1DA7 8945 A39C FCCF B60F 2CB7 F48C 3A00 3D90

To claim this, I am signing this object:

# FIRST_COMMIT=$(git rev-list --parents HEAD | egrep "^[a-f0-9]{40}$")
FIRST_COMMIT="11151aa8ea4da0f9a71e88a5db3c9b4444e555df"
RESOLVE_TAG="
var message = process.argv[1];
var regex = /^v([0-9]+)\.([0-9]+)\.([0-9]+) (full|base)/;
var match = message.match(regex);
if (!match) {
process.exit(0);
@LoicMahieu
LoicMahieu / comparison.md
Created August 10, 2015 12:51
Price comparison of centralized logging management
@LoicMahieu
LoicMahieu / reminder.md
Created June 15, 2015 09:22
OVH Object Storage
@LoicMahieu
LoicMahieu / index.js
Created June 11, 2015 09:04
requirebin sketch
var JSData = require('js-data');
var DSHttpAdapter = require('js-data-http');
var store = new JSData.DS();
var httpAdapter = new DSHttpAdapter({});
httpAdapter.defaults.basePath = 'http://jsonplaceholder.typicode.com/';
// register and use http by default for async operations
store.registerAdapter('http', httpAdapter, { default: true });
$ etcdctl ls / --recursive
/deis
/deis/builder
/deis/builder/users
/deis/builder/users/admin
/deis/builder/users/admin/40:ac:d8:a8:bc:a5:0e:64:8c:8a:ad:72:36:8c:93:eb
/deis/builder/users/loic
/deis/builder/users/loic/6d:f7:8f:7c:99:31:64:50:af:5a:2a:05:9e:8b:ff:90
/deis/database
/deis/database/adminPass