Skip to content

Instantly share code, notes, and snippets.

@MiLk
MiLk / keybase.md
Created March 29, 2019 07:16
keybase.md

Keybase proof

I hereby claim:

  • I am MiLk on github.
  • I am emilienmilk (https://keybase.io/emilienmilk) on keybase.
  • I have a public key whose fingerprint is 1075 DEB6 61F4 4164 6468 7EA2 895F 7245 BEED D2EC

To claim this, I am signing this object:

@MiLk
MiLk / config.yml
Last active March 28, 2017 07:34
Vault HA init
- name: "Waiting for the Vault to be unsealed"
uri:
url: '{{ vault_api_url }}/v1/sys/seal-status'
return_content: yes
register: vault_seal_status
until: vault_seal_status.json.sealed == false
retries: 90
delay: 10
changed_when: false
@MiLk
MiLk / keybase.md
Created October 21, 2016 06:29
keybase.md

Keybase proof

I hereby claim:

  • I am MiLk on github.
  • I am emilienmilk (https://keybase.io/emilienmilk) on keybase.
  • I have a public key whose fingerprint is A7A9 FA44 1041 6309 8C99 42BF F473 715C 7AAC 4B0B

To claim this, I am signing this object:

@MiLk
MiLk / AdminController.php
Last active August 29, 2015 03:17
CraftaShop fix
<?php
// controller/AdminController.php
function description($action=null) {
$this->loadModel("Configs");
$datas["configs"] = $this->Configs->listed("Presentation");
$datas["messages"] = $this->Configs->listed("Message");
$this->set($datas);
@MiLk
MiLk / Makefile
Created April 2, 2015 07:19
docker -> marathon
IMAGE_NAME = company/dev
REGISTRY = registry.company.tld
MARATHON_URL = http://marathon.company.tld:8080
.PHONY: build push
build:
docker build -t "${IMAGE_NAME}" .
docker tag \
-f $(shell docker inspect --format='{{.Id}}' ${IMAGE_NAME}) \
#!/bin/bash
conf_file=
disable_gpg_check=
disablerepo=
enablerepo=
name=
state="present"
changed=0
I0417 02:43:52.922135 2018 master.cpp:784] Received registration request from scheduler(1)@172.16.0.180:49120
I0417 02:43:52.922379 2018 master.cpp:802] Registering framework 201404160134-3053457580-5050-1887-0001 at scheduler(1)@172.16.0.180:49120
I0417 02:43:52.923539 2018 hierarchical_allocator_process.hpp:332] Added framework 201404160134-3053457580-5050-1887-0001
I0417 02:43:52.924255 2018 master.cpp:1787] Sending 2 offers to framework 201404160134-3053457580-5050-1887-0001
I0417 02:43:53.262133 2020 master.cpp:2124] Processing reply for offer 201404160134-3053457580-5050-1887-59 on slave 201404160133-3036680364-5050-7214-2 (172.16.0.182) for framework 201404160134-3053457580-5050-1887-0001
I0417 02:43:53.262337 2020 master.hpp:406] Adding task sssp-201404107T024353.123Z-402531b0 with resources cpus(*):0.2; mem(*):256; ports(*):[31000-31000] on slave 201404160133-3036680364-5050-7214-2 (172.16.0.182)
I0417 02:43:53.262433 2020 master.cpp:2248] Launching task sssp-201404107T024353.123Z-402531b0 of
@MiLk
MiLk / .aeriscloud.yml
Last active August 29, 2015 13:58
Simple http server
game_name: echo-env
id: 2
@MiLk
MiLk / nagios-qh.js
Created January 22, 2014 12:39
Use Nagios query handler with Node.js
var net = require('net');
var test_message = "TestMessage";
var client = net.connect({ path: '/var/nagios/rw/nagios.qh' }, function() {
client.write('@echo ' + test_message + '\0');
});
client.on('data', function(data) {
console.log(data.toString());
client.end();
@MiLk
MiLk / etc_init.d_nagios
Created January 11, 2014 11:06
Nagios init script
start() {
test -x $exec || exit 5
test -f $config || exit 6
if test "$checkconfig" = "true"; then
check_config
fi
options="-d"
if test "$use_precached_objects" = "true"; then
options="$options -u"
fi