Skip to content

Instantly share code, notes, and snippets.

View epcim's full-sized avatar

Petr Michalec epcim

View GitHub Profile
@epcim
epcim / .zshrc
Created December 6, 2020 11:28 — forked from dwchiang/.zshrc
gcloud with zsh
# The next line updates PATH for the Google Cloud SDK.
source /Users/dwchiang/google-cloud-sdk/path.zsh.inc
# The next line enables zsh completion for gcloud.
source /Users/dwchiang/google-cloud-sdk/completion.zsh.inc
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: eksctl-us-west-2-managed
region: us-west-2
vpc:
id: vpc-0b953326cd7a2f917
subnets:
@epcim
epcim / disable-ipv6.sh
Created July 1, 2020 07:09 — forked from kwilczynski/disable-ipv6.sh
Amazon Linux OS tweaks
#!/bin/bash
set -u
set -e
set -o pipefail
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
cat <<'EOF' > /etc/modprobe.d/blacklist-ipv6.conf
@epcim
epcim / instructions.md
Created March 24, 2020 12:09 — forked from douglasmiranda/instructions.md
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 &gt; keybase-private.key
@epcim
epcim / keybase.md
Created March 24, 2020 07:05 — forked from webframp/keybase.md
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

@epcim
epcim / wait_for_http_200.sh
Created August 26, 2019 09:53 — forked from rgl/wait_for_http_200.sh
Wait for an HTTP endpoint to return 200 OK with Bash and curl
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done'
# also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76
@epcim
epcim / virtualbox_ports.png
Created March 21, 2019 19:24 — forked from snb/virtualbox_ports.png
virtualbox serial console
virtualbox_ports.png
@epcim
epcim / gist:eac5083ae1ea5e8dc0e862d9dfa28fbd
Created March 12, 2019 20:33 — forked from mattm7n/gist:1405067
Monitor DHCP traffic with tcpdump
# Monitoring on interface eth0
tcpdump -i eth0 -n port 67 and port 68
@epcim
epcim / gist:da40504103f2390f76ebcee4fe48e226
Created March 3, 2019 12:05
Uninstall XQuartz.app from OSX Yosemite/El Capitan/Sierra
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist && \
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist && \
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz && \
sudo pkgutil --forget org.macosforge.xquartz.pkg && \
rm -rf ~/.serverauth* && rm -rf ~/.Xauthorit* && rm -rf ~/.cache && rm -rf ~/.rnd && \
rm -rf ~/Library/Caches/org.macosforge.xquartz.X11 && rm -rf ~/Library/Logs/X11
@epcim
epcim / vimrc
Created February 4, 2019 14:18 — forked from jonmorehouse/vimrc
UUID generator for vim. Inputs a uuid to copy buffer
fu! GenerateUUID()
python << EOF
import uuid
import vim
# output a uuid to the vim variable for insertion below
vim.command("let generatedUUID = \"%s\"" % str(uuid.uuid4()))
EOF