Skip to content

Instantly share code, notes, and snippets.

View lukasmartinelli's full-sized avatar

Lukas Martinelli lukasmartinelli

View GitHub Profile
var metrics = {"family":"Open Sans","style":"Regular","buffer":3,"size":24,"chars":{" ":[0,0,0,0,6],"!":[4,19,1,18,6,2,2],"\"":[8,8,1,18,9,14,2],"#":[15,18,0,18,15,30,2],"$":[12,21,1,19,13,53,2],"%":[18,19,1,18,19,73,2],"&":[17,19,1,18,17,99,2],"'":[3,8,1,18,5,124,2],"(":[7,22,0,18,7,135,2],")":[7,22,0,18,7,150,2],"*":[12,12,1,19,13,165,2],"+":[12,13,1,15,13,185,2],",":[5,7,0,3,5,205,2],"-":[7,3,0,8,7,218,2],".":[4,4,1,3,6,233,2],"/":[9,18,0,18,8,245,2],"0":[12,19,1,18,13,262,2],"1":[7,18,2,18,13,282,2],"2":[12,18,1,18,13,297,2],"3":[12,19,1,18,13,317,2],"4":[14,18,0,18,13,337,2],"5":[12,19,1,18,13,359,2],"6":[12,19,1,18,13,379,2],"7":[12,18,1,18,13,399,2],"8":[12,19,1,18,13,419,2],"9":[12,19,1,18,13,439,2],":":[4,15,1,14,6,459,2],";":[5,18,0,14,6,471,2],"<":[12,13,1,15,13,484,2],"=":[12,7,1,12,13,218,14],">":[12,13,1,15,13,165,22],"?":[10,19,0,18,10,185,23],"@":[20,21,1,18,21,484,23],"A":[16,18,0,18,15,238,28],"B":[13,18,2,18,15,459,28],"C":[14,19,1,18,15,14,28],"D":[15,18,2,18,17,282,28],"E":[10,18,2,18,13,

Howto Reset etcd discovery

Every time my test cluster is going down, I was struggeling with etcd autodiscovery failing. This looks probably familiar to you:

The Problem

systemd[1]: Starting etcd...
systemd[1]: Started etcd.
etcd[3066]: [etcd] Apr  9 08:31:42.512 INFO      | Discovery via https://discovery.etcd.io using prefix /<TOKEN>.
@garrettreid
garrettreid / SSHA512_gen.py
Created January 9, 2014 05:26
Create a salted SHA512 password hash for use with Dovecot
#!/usr/bin/python
import os
import hashlib
import getpass
import base64
password1 = None
password2 = None
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active November 14, 2024 09:13
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'