Skip to content

Instantly share code, notes, and snippets.

Petr Michalec epcim

Block or report user

Report or block epcim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@epcim
epcim / keybase-github.md
Created Mar 31, 2017
keybase github git gpg pgp
View keybase-github.md
View gist:3f09e55183d9f287d6fe6f8076a4ccc3

Signing someone else key

Get key to sign

gpg --list-keys

Sign the key

gpg --sign-key --ask-cert-level 0xXXXXXXXXX
@ermus19
ermus19 / GPG.txt
Last active Apr 5, 2017
GPG & github gpg sign
View GPG.txt
gpg --import private_key.asc
gpg --list-secret-keys --keyid-format LONG
gpg --delete-secret-key <key>
gpg --edit-key <key>
passwd
git config --global user.signingkey <key>
@igolden
igolden / react-native-ultisnip.snippet
Created Dec 6, 2016
React Native snippets for vim and ultisnip
View react-native-ultisnip.snippet
snippet rnccf
import React, { PropTypes } from 'react'
import { View, StyleSheet, Text } from 'react-native'
$1.propTypes = {
}
export default function ${1:FunctionName} (props) {
return (
@epcim
epcim / openstack_tempest_cleanup.sh
Created Nov 16, 2016
openstack tempest cleanup
View openstack_tempest_cleanup.sh
#!/bin/bash
# cleanup tempest
neutron port-list --all-tenants | grep tempest | awk '{print $2}' | xargs -i neutron port-delete {}
neutron subnet-list --all-tenants | grep tempest | awk '{print $2}' | xargs -i neutron subnet-delete {}
neutron subnet-list --all-tenants | grep "100.FIXME" | awk '{print $2}' | xargs -i neutron subnet-delete {}
neutron net-list --all-tenants | grep tempest | awk '{print $2}' | xargs -i neutron net-delete {}
neutron net-list --all-tenants | grep snat-si-left_snat_ | awk '{print $2}' | xargs -i neutron net-delete {}
neutron security-group-list --all-tenants | grep tempest | awk '{print $2}' | xargs -i neutron security-group-delete {}
neutron router-list --all-tenants | grep tempest | awk '{print $2}' | xargs -i neutron router-delete {}
@mpneuried
mpneuried / Makefile
Last active Dec 5, 2019
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
View Makefile
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@ajayhn
ajayhn / ifmap-server-error-handling
Created Sep 15, 2016
ifmap-server-error-handling
View ifmap-server-error-handling
1. timeout when publishing to ifmap-server (mapclient.call())
when timeout happens keep retrying
2. ifmap-server code needs to inspect healthcheck object publish and if it misses n of them, exit() OR
config-nodemgr keeps reading healthcheck object from ifmap-server and if it can't read in n secs or value is stale, kill ifmap-server
3. control-node keeps reading healthcheck object from ifmap and it sees stale, move to a new ifmap-server
4. ifmap-publish-greenlet enqueue finds q-full, no change from current
@epcim
epcim / salt-trends.sh
Last active May 20, 2019
salt states trends jq yq
View salt-trends.sh
@Titerote
Titerote / ignition_config.yml
Last active Jun 29, 2018
Ignition problem on coreos
View ignition_config.yml
---
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 Aug 10, 2017
byobu auto create windows from salt-master accepted keys
View byobu-salt.sh
#!/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 || {
You can’t perform that action at this time.