Skip to content

Instantly share code, notes, and snippets.

View epcim's full-sized avatar

Petr Michalec epcim

View GitHub Profile
# Kubernetes configuration dirs and system namespace.
# Those are where all the additional config stuff goes
# the kubernetes normally puts in /srv/kubernetes.
# This puts them in a sane location and namespace.
# Editing those values will almost surely break something.
kube_config_dir: /etc/kubernetes
kube_script_dir: "{{ bin_dir }}/kubernetes-scripts"
kube_manifest_dir: "{{ kube_config_dir }}/manifests"
# This is where all the cert scripts and certs will be located
@douglasmiranda
douglasmiranda / instructions.md
Created July 19, 2018 05:51
Add email to Keybase.io PGP Key (Public Key)

Export your public key:

keybase pgp export > keybase-public.key

Export your private key:

keybase pgp export --secret > keybase-private.key
@epcim
epcim / docker-compose.yml
Created July 18, 2018 13:08 — forked from christophermaier/docker-compose.yml
Habitat testing setup
version: '3.2'
services:
bastion:
image: christophermaier/test-probe:0.1.0-20180509175222
command:
- "run"
- "--listen-ctl=0.0.0.0:9632"
- "--permanent-peer"
hostname: bastion
domainname: habitat.dev
import sys
# Constants
OPERATORS = ['*', '/', '+', '-']
DECIMAL_SYMBOLS = [',', '.']
SIGN_SYMBOLS = ['-', '+']
PARENTHESIS_OPEN = '('
PARENTHESIS_CLOSE = ')'
PRECEDENCE = [[PARENTHESIS_OPEN], ['*', '/'], ['+', '-']]
@christophermaier
christophermaier / docker-compose.yml
Created July 17, 2018 21:47
Habitat testing setup
version: '3.2'
services:
bastion:
image: christophermaier/test-probe:0.1.0-20180509175222
command:
- "run"
- "--listen-ctl=0.0.0.0:9632"
- "--permanent-peer"
hostname: bastion
domainname: habitat.dev
@guillaumef
guillaumef / aes256-compat-openssl-enc-dec.py
Last active April 11, 2023 03:19
Python - AES 256 crypt/decrypt compatible with 'openssl enc' format
#!python
"""OpenSSL enc compatible script by Python.
"""
""" Based on:
https://gist.github.com/chrono-meter/d122cbefc6f6248a0af554995f072460
Added: base64
Need: python3-crypto
# Encrypt
python3 ./aes256-compat-openssl-enc-dec.py -in <filein> -e -salt -aes-256-cbc
@davewongillies
davewongillies / Terraform_functions.md
Last active July 15, 2023 14:41
Terraform Functions

Supported built-in functions

  • abs(float) - Returns the absolute value of a given float. Example: abs(1) returns 1, and abs(-1) would also return 1, whereas abs(-3.14) would return 3.14. See also the signum function.

  • basename(path) - Returns the last element of a path.

  • base64decode(string) - Given a base64-encoded string, decodes it and returns the original string.

@dshcherb
dshcherb / maas-squashfs-backdoor.sh
Created October 10, 2017 12:14
A procedure to add a root password to maas-deployed cloud images for last-resort debugging.
https://gnu-linux.org/building-ubuntu-rootfs-for-arm.html
"2) Extract the downloaded image with ‘sudo’ to allow ‘mknod’ commands to work"
# get a cloud image from here
# https://cloud-images.ubuntu.com/daily/server/xenial/
# https://cloud-images.ubuntu.com/daily/server/xenial/current/
# based on https://bazaar.launchpad.net/~maas-images-maintainers/maas-images/maas-ephemerals/view/head:/bin/img2squashfs#L161
# extract a cloud image rootfs to a directory, sudo is needed for `mknod`s to work
# doesn't have to be .tar.gz - could well unsquashfs an existing squashfs
@Integralist
Integralist / hugo-build.sh
Created August 28, 2017 06:51
[Hugo build script for User page] #github #hugo #build
#!/usr/bin/env bash
function contains {
local e match="$1"
shift
for e; do [[ "$e" == "$match" ]] && return 0; done
return 1
}
function remove_toplevel {