Skip to content

Instantly share code, notes, and snippets.

Petr Michalec epcim

View GitHub Profile
View k8s-cluster.yml
# 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
View docker-compose.yml
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
View bc.py
import sys
# Constants
OPERATORS = ['*', '/', '+', '-']
DECIMAL_SYMBOLS = [',', '.']
SIGN_SYMBOLS = ['-', '+']
PARENTHESIS_OPEN = '('
PARENTHESIS_CLOSE = ')'
PRECEDENCE = [[PARENTHESIS_OPEN], ['*', '/'], ['+', '-']]
View docker-compose.yml
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
View Terraform_functions.md

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 Oct 10, 2017
A procedure to add a root password to maas-deployed cloud images for last-resort debugging.
View maas-squashfs-backdoor.sh
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 Aug 28, 2017
[Hugo build script for User page] #github #hugo #build
View hugo-build.sh
#!/usr/bin/env bash
function contains {
local e match="$1"
shift
for e; do [[ "$e" == "$match" ]] && return 0; done
return 1
}
function remove_toplevel {
@epcim
epcim / pmichalec.env
Last active Aug 29, 2018
shell bash simple environment profile env bashrc shellrc
View pmichalec.env
# bash history
# echo 'shopt -s histappend' >> ~/.bashrc
# echo 'PROMPT_COMMAND="history -a;$PROMPT_COMMAND"' >> ~/.bashrc
# echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc
shopt -s histappend
PROMPT_COMMAND="history -a;$PROMPT_COMMAND"
export HISTTIMEFORMAT=
# paths
export PATH=$PATH:~/bin
@mshkrebtan
mshkrebtan / webex-ubuntu.md
Last active Apr 11, 2019
Run Cisco Webex on 64-bit Ubuntu 16.04
View webex-ubuntu.md

Run Cisco Webex on 64-bit Ubuntu 16.04

With Audio and Screen Sharing Enabled

Enable support for 32-bit executables

Add the i386 architecture to the list of dpkg architectures :

sudo dpkg --add-architecture i386
@epcim
epcim / keybase-github.md
Created Mar 31, 2017
keybase github git gpg pgp
View keybase-github.md
You can’t perform that action at this time.