Skip to content

Instantly share code, notes, and snippets.

View rhicks's full-sized avatar

Richard Hicks rhicks

View GitHub Profile
restic restore latest -r rest:http://limbo.nero.net:8000 -H git.nero.net -i /etc/passwd -t ~/tmp/restic
@rhicks
rhicks / gist:a4f3be137099d2fc9dd553fda6554fef
Last active February 14, 2019 17:05
How to NCON DDoS Mitigate
!!!!!! THE -n IS FOR DRYRUN. REMOVE TO PUSH REAL CHANGE !!!!!!
cd ~/Repo/ncon
source venv/bin/activate
ncon netcmd ddos-mitigate --ip 140.211.167.122 -T cisco_xr -d eugn-core1-gw-lb.nero.net -n
ncon netcmd ddos-mitigate --ip 140.211.167.122 -T cisco_xr -d ptck-core1-gw-lb.nero.net -n
ncon netcmd ddos-mitigate --ip 140.211.167.122 -T cisco_xr -d ptck-core2-gw-lb.nero.net -n
policy-options {
prefix-list nero-noc-networks {
{% for network in nero_noc_networks %}
{{ network }};
{% endfor %}
}
prefix-list trusted-networks {
{% for network in ipv4_allowed_networks %}
{{ network }};
{% endfor %}
@rhicks
rhicks / gist:3156727
Created July 21, 2012 18:47 — forked from jasoncodes/gist:1223731
Installing Ruby 1.9.3 with rbenv
brew install rbenv
brew install ruby-build
brew install rbenv-vars
brew install readline
brew install ctags
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile
exec $SHELL -i # reload the shell
CONFIGURE_OPTS="--disable-install-doc --with-readline-dir=$(brew --prefix readline)"
rbenv install 1.9.3-p194
rbenv global 1.9.3-p194