Skip to content

Instantly share code, notes, and snippets.

@roulette6
roulette6 / k3s-nfs.md
Created October 2, 2023 16:20
k3s-nfs

Provisioner

$ kubectl get storageclasses
NAME                   PROVISIONER                                         RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-path (default)   rancher.io/local-path                               Delete          WaitForFirstConsumer   false                  4d18h
nfs                    cluster.local/nfs-nfs-subdir-external-provisioner   Delete          Immediate              true                   97m

PV (not associated with the storage class)

@roulette6
roulette6 / vim-shortcuts.md
Last active January 2, 2020 05:36
Vim shortcuts

Buffers

keys Action
:ls list open buffers
:b3 go to third buffer
:bn buffer next
:bp buffer previous
:bp buffer delete (close)
:e . browse working directory
@roulette6
roulette6 / ansible-setup-ad-hoc-deep-dive.md
Last active January 8, 2022 02:36
Ansible setup, config, and ad hoc deep dive
@roulette6
roulette6 / bgp-commands.md
Last active December 4, 2018 14:20
BGP commands

BGP neighbor states

  • Idle:
    • Trying to initiate a TCP connection and listening for TCP connections from peers
    • Admin disabled (neighbor shutdown)
    • Router is waiting before next retry
  • Connect: BGP initiates the TCP 3-way handshake.
    • If successful, send Open msg and change to OpenSent.
    • If failed, reset the ConnectRetryTimer and move to active state.
  • Active: Trying to establish TCP connection; no BGP messages yet sent
  • OpenSent: TCP connection exists and this router has sent the first message to establish the BGP neighbor relationship
@roulette6
roulette6 / linux-dns.md
Created February 21, 2018 02:13
Linux managing DNS servers (LPIC-2)

Linux managing DNS servers (LPIC-2)

Quick command reference

lsb_release -d          # get Linux distro and version
cat /etc/centos-release

# ubuntu
sudo /etc/init.d/bind9 {start | stop | restart}

sudo -u bind rndc status

@roulette6
roulette6 / useful show commands.md
Last active May 12, 2018 15:50
Useful show commands
@roulette6
roulette6 / N7k keystroke shortcuts.md
Last active October 30, 2016 03:35
Command key combinations that can be used in both EXEC and configuration modes
Shortcut Description
Ctrl-B More cursor one char left, good for multi-line commands
Ctrl-C Cancels the command and returns to the command prompt (EXEC mode)
Ctrl-D Deletes the character at the cursor
Ctrl-F Moves the cursor one character to the right
Ctrl-G Exits to the previous command mode without removing the command string
Ctrl-K Deletes all characters from the cursor to the end of the command line
Ctrl-L Redisplays the current command line
Ctrl-N Displays the next command in the command history

Practice sites

  • RegEx 101 - Handles PCRE (PHP), JavaScript, and Python
  • RegExr - Lets you test replacing using capture groups. Cannot handle lookbehinds b/c JavaScript only
  • regex one - Has lessons

RegEx metachars and symbols

Metachar Meaning
\n newline