Skip to content

Instantly share code, notes, and snippets.

require 'bcrypt'
module EasyAuth
# http://techspeak.plainlystated.com/2010/03/drop-dead-simple-authentication-for.html
# To generate a crypted password (in irb):
# require 'easy_auth'
# EasyAuth.encrypt_password('my_password') # Put returned array in AUTHORIZED_USERS
AUTHORIZED_USERS = {
def morse s;s.upcase.each_byte.map{|c|c==32?' ':"c 1mn 1mx 5v 1 v5 65 uv b xy 5w xn m l 66 xx 1pg 3d 33 2 34 uw 3e 1mo 1my 1pf".split[c-65].to_i(36).to_s.gsub(/1/,'.').gsub(/2/,'-')}.join;end
def morse s;o='';s.upcase.each_byte{|c|o+=c==32?' ':"c 1mn 1mx 5v 1 v5 65 uv b xy 5w xn m l 66 xx 1pg 3d 33 2 34 uw 3e 1mo 1my 1pf".split[c-65].to_i(36).to_s.gsub(/1/,'.').gsub(/2/,'-')};o;end
➜ lager_config rebar eunit skip_deps=true
zsh: correct 'eunit' to '.eunit' [nyae]? n
==> lager_config (eunit)
Compiled test/lager_config_tests.erl
=PROGRESS REPORT==== 5-Oct-2013::17:58:25 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.77.0>},
{name,alarm_handler},
{mfargs,{alarm_handler,start_link,[]}},
pvesh create /nodes/kvm01/storage/local/content -filename vm-101-disk-0.qcow2 -format qcow2 -size 32G -vmid 101
pvesh create /nodes/kvm01/qemu -vmid 101 -memory 2048 -sockets 1 -cores 4 -net0 e1000,bridge=vmbr0 -net1 e1000,bridge=vmbr1 -ide0=local:101/vm-101-disk-0.qcow2 -ide2 local:iso/CentOS-6.5-x86_64-minimal.iso,media=cdrom
pvesh create /nodes/kvm01/qemu/101/status/start
# Script to export TempoDB data.
# Relies on TempoDB python client v1.0: https://github.com/tempodb/tempodb-python/tree/v1.0
import datetime
import os
import re
import json
import uuid
from tempodb.client import Client
# Script to export TempoDB data.
# Relies on TempoDB python client v1.0: https://github.com/tempodb/tempodb-python/tree/v1.0
import datetime
import os
import re
import json
import uuid
from tempodb.client import Client
@plainlystated
plainlystated / prometheus.yml
Created April 7, 2020 17:14
Default Prometheus Docker Config
global:
evaluation_interval: 1m
scrape_interval: 30s
scrape_timeout: 10s
rule_files:
- /etc/config/recording_rules.yml
- /etc/config/alerting_rules.yml
- /etc/config/rules
- /etc/config/alerts
scrape_configs: