Skip to content

Instantly share code, notes, and snippets.

@netravnen
netravnen / .screenrc
Last active February 15, 2021 10:10
basic screen runtime file
#~/.screenrc
terminfo * F1=^[OP
terminfo * "^[[23~"=^[OP
terminfo * F2=^[OQ
terminfo * "^[[24~"=^[OQ
bindkey -k F1 prev
bindkey "^[[23~" prev
bindkey -k F2 next
@netravnen
netravnen / Public_Time_Servers.md
Last active November 13, 2020 22:44 — forked from mutin-sa/Top_Public_Time_Servers.md
List of Top Public Time Servers

Google Public NTP [AS15169]:

  • time.google.com
  • time1.google.com
  • time2.google.com
  • time3.google.com
  • time4.google.com

Cloudflare NTP [AS13335]:

Extended Community protocol src prt dst prt drop/shape implemented semantics
target:6695:4200000000 any any any drop yes DROP any traffic for prefix.
target:6695:4200000001 any any any shape yes SHAPE any traffic for prefix.
target:6695:4200000002 UDP any any drop yes DROP any UDP traffic for prefix.
target:6695:4200000003 UDP any any shape yes SHAPE any UDP traffic for prefix.
target:6695:4200000004 UDP 0 any drop yes DROP any UDP fragments for prefix.
target:6695:4200000005 UDP 0 any shape yes SHAPE any UDP fragments for prefix.
target:6695:4200000006 UDP 19 any drop yes DROP any UDP traffic with src Port 19 for prefix.
target:6695:4200000007 UDP 19 any shape yes SHAPE any UDP traffic with src Port 19 for prefix.
target:6695:4200000008 UDP 53 any drop yes DROP any UDP traffic with src Port 53 for prefix.
@netravnen
netravnen / lacp-modes.md
Created October 19, 2020 07:54
Link Aggregation Group (LAG) Link Aggregation Control Protocol (LACP) modes
SW1
SW2 MODE PAgP
Desirable
PAgP
Auto
LACP
Active
LACP
Passive
ON
PAgP
Desirable
Yes Yes No No No
PAgP
Auto
Yes No No No No
LACP
Active
No No Yes Yes No
LACP
Passive
No No Yes No No
ON No No No No Yes
@netravnen
netravnen / Update-AUPackages.md
Last active April 26, 2020 13:24
Update-AUPackages Report #powershell #chocolatey
# read -p "Useraccount: " user_account
# sh -c 'if [ -d $HOME/.dotfiles ]; then rm $HOME/.dotfiles; fi
# git clone https://code.netravnen.org/netravnen/dotfiles $HOME/.dotfiles
# for FILE in $(ls -al1 $HOME/.dotfiles/dotfiles | grep "^-" | cut -c52-); do
# if [ -f $HOME/$FILE ]; then rm $HOME/$FILE; fi # Remove conflicting files in homedir
# done
# if [ -d $HOME/.byobu ]; then rm -rf $HOME/.byobu; fi # Remove byobu from homedir
# cd $HOME/.dotfiles && git pull && stow -R dotfiles && cd
# source .bashrc' user_account
#!/bin/bash
curl_opts="-snGL" # generic curl options
curl_url_opts="--data-urlencode adm=2 --data-urlencode res=3 --data-urlencode bare --data-urlencode wl=all --data-urlencode rnd=true --data-urlencode pct=99" # api params
openic_api_url="https://api.opennicproject.org/geoip/" # api url
# Fetch random selection of OpenNIC servers
opennic_servers="$(curl ${curl_opts} ${curl_url_opts} --data-urlencode ipv=4 ${openic_api_url})"
opennic_servers+=" $(curl ${curl_opts} ${curl_url_opts} --data-urlencode ipv=6 ${openic_api_url})"
#!/bin/bash
#
# FILENAME: /usr/local/sbin/roa-export
#
#
# PARAMS
#
WORK_DIR=/tmp
@netravnen
netravnen / .bashrc
Created September 13, 2019 13:23
Quick basic bash profile
# $HOME/.bashrc: executed by bash(1) for non-login shells.
export GPG_TTY=$(tty)
# If not running interactively, do not do anything
[ -z "$PS1" ] && return
HISTCONTROL=ignoreboth
HISTCONTROL=ignoredups
HISTCONTROL=ignorespace
HISTFILESIZE=25000
HISTIGNORE="ls:bg:fg:history"
HISTSIZE=25000
#!/bin/bash
read -s -p "$(date --utc +'%FT%T.%3NZ'): Enter Password: " SSH_KEY_PASSWORD
#OPTS="-q -C ${SSH_COMMENT} -P ${SSH_KEY_PASSWORD}"
OPTS="-q -N ${SSH_KEY_PASSWORD}"
SSH_DIR="$HOME/.ssh" ; if [ ! -d $SSH_DIR ] ; then mkdir -p $SSH_DIR ; chown -R $USER:$USER $SSH_DIR ; chmod -R 700 $SSH_DIR ; fi
SSH_FILE_PREFIX='id_'