Skip to content

Instantly share code, notes, and snippets.

View kakoni's full-sized avatar

Karri Niemelä kakoni

View GitHub Profile
# Reset
Vault is storing its state in Consul, so if you shut down Vault and delete Vault's key prefix in Consul
things should start clean again.
consul kv delete -recurse vault
# Double listeners
listener "tcp" {
address = "0.0.0.0:8200"
cluster_address = "0.0.0.0:8201"
https://github.com/larsp/co2monitor
https://www.amazon.de/TFA-Dostmann-CO2-Messger%C3%A4t-AirCO2ntrol-mini/dp/B00TH3OW4Q/ref=sr_1_1?ie=UTF8&qid=1516524053&sr=8-1&keywords=tfa+dostmann+co2
- consul kv export
- consul kv import
- consul kv delete core/lock
https://github.com/myENA/consul-backinator
https://github.com/seatgeek/hashi-helper
https://github.com/jaxxstorm/hookpick
GGL, GGU = Pine, Polyurethane
359 old size, m06 new size. 78cm x 118cm
3059 = Glazing. 066 (2015) lumikkuna.
VELUX GGL 3068 - Kolminkertainen lasipaketti, Uw 1.1 W/m²K
VELUX GGL 3066 - Kolminkertainen lasipaketti, Uw 1.0 W/m²K (interbauen +111e)
VELUX GGL 3062 - Kolminkertainen lasipaketti, Uw 0.89 W/m²K
VELUX GGL 2066 - Valkoiseksi maalattu, kolminkertainen lasipaketti, Uw 1.0 W/m²K
ZIU
@kakoni
kakoni / gist:301ffe6f029491792cbae2d3017c3992
Last active November 2, 2017 09:10
Missing PSQL indexes query
=== unused indexes ==
SELECT
schemaname || '.' || relname AS table,
indexrelname AS index,
pg_size_pretty(pg_relation_size(i.indexrelid)) AS index_size,
idx_scan as index_scans
FROM pg_stat_user_indexes ui
JOIN pg_index i ON ui.indexrelid = i.indexrelid
WHERE NOT indisunique AND idx_scan < 50 AND pg_relation_size(relid) > 5 * 8192
ORDER BY
https://quiltdata.com/
https://www.synapse.org/
http://frictionlessdata.io/data-packages/
https://datproject.org/
@kakoni
kakoni / gist:68296f1eb13ef2924fa79bacae50027d
Last active July 4, 2017 22:00
Vue 2 dynamic templates
new Vue({
el: '#app',
data: {
msg: 'foo'
},
template: '<div><span>{{ msg }}!!</span></div>',
mounted() {
var self = this;
setTimeout(function() {
var res = Vue.compile('<div><span>ei {{ msg }}!!</span></div>');
@kakoni
kakoni / Dockerfile
Created June 24, 2017 11:55
Intersystems cache dockerization
# Intersystems cache docker buildfile
# Based on Dmitry Maslennikov's(https://community.intersystems.com/post/containerization-cach%C3%A9)
# and Luca Ravazzolo's (https://github.com/zrml/ccontainermain) work
FROM centos:6
# update OS + dependencies & run Caché silent install
RUN yum -y update \
&& yum -y install which tar hostname net-tools wget \
&& yum -y clean all \
@kakoni
kakoni / gist:9eb3e7a622edcbd64de9769209688c5f
Created June 20, 2017 20:42
mssql-server-docker ssis
# Base OS layer: Latest Ubuntu LTS + mssql-server-linux (SQL Server engine + tools)
FROM microsoft/mssql-server-linux
#Install curl since it is needed to get repo config
# Get official Microsoft repository configuration
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y curl sudo && \
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | tee /etc/apt/sources.list.d/mssql-server.list && \
require 'rbnacl'
require 'base64'
class Example
attr_reader :secret_box, :index_key
def initialize
key = RbNaCl::Random.random_bytes(RbNaCl::SecretBox.key_bytes)
@index_key = RbNaCl::Random.random_bytes(RbNaCl::SecretBox.key_bytes)
@secret_box = RbNaCl::SecretBox.new(key)