Skip to content

Instantly share code, notes, and snippets.

View epcim's full-sized avatar

Petr Michalec epcim

View GitHub Profile
@epcim
epcim / salt-trends.sh
Last active May 20, 2019 21:26
salt states trends jq yq
@Titerote
Titerote / ignition_config.yml
Last active June 29, 2018 13:19
Ignition problem on coreos
---
systemd:
units:
- name: etcd2.service
enable: true
dropins:
- name: 40-etcd-cluster.conf
contents: |
[Service]
Environment="ETCD_NAME={{.etcd_name}}"
@epcim
epcim / byobu-salt.sh
Last active August 10, 2017 12:29
byobu auto create windows from salt-master accepted keys
#!/bin/bash
# wget https://gist.githubusercontent.com/epcim/b44b548cadc566fcabc9f6195a19b1dc/raw/byobu-salt.sh -O byobu-salt.sh; chmod +x *.sh
# set -x
# TODO
# on remote host source ~/.${SHELL}rc
# auto set -o vi
test -n SSH_AGENT || {
@dsdenes
dsdenes / nvidia-docker-install-ubuntu16.04.sh
Created August 14, 2016 11:22
nvidia-docker install on Ubuntu 16.04
#!/bin/bash
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo echo deb https://apt.dockerproject.org/repo ubuntu-xenial main > /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get purge lxc-docker docker.io
sudo apt-get install linux-image-extra-$(uname -r)
sudo apt-get install docker-engine
@eferro
eferro / _aws_golang_examples.md
Last active August 21, 2024 05:20
golang aws: examples

AWS Golang SDK examples

@epcim
epcim / byobu.sh
Last active August 12, 2016 10:33
byobu with default windows
#!/bin/bash
test -n SSH_AGENT || {
eval $(ssh-agent -s)
ssh-add
}
#create session
byobu-tmux new-session -dn $(hostname -f) "sudo -i"
# populate from salt-key
@olih
olih / jq-cheetsheet.md
Last active May 10, 2025 20:55
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@dsundarraj
dsundarraj / mx-config.txt
Created March 15, 2016 20:28
MX Configuration Steps for Floating IP
Step 1: Enable tunnel services
for example: for an mx480 with two fpcs for redundant logical tunnels
fpc 1 {
pic 0 {
tunnel-services;
inline-services {
bandwidth 10g;
}
}
pic 1 {