Skip to content

Instantly share code, notes, and snippets.

@LeeBrotherston
LeeBrotherston / version-control-your-bash-rc-file-with-gist.md
Created February 26, 2018 20:57 — forked from Ashwinning/version-control-your-bash-rc-file-with-gist.md
Version control your `.bashrc` file (or any other file) with Github Gist #gistblog #ubuntu #bash

Version control your .bashrc file with Github Gist

Install Gist on your machine

If you have ruby installed (how to install ruby):

sudo gem install gist

‌If you're using Bundler:

@LeeBrotherston
LeeBrotherston / gist:92cc2637f33468485b8f
Created February 21, 2016 05:38
Detect TLS Client Hello in many things using a BPF
Match TLS Client Hello packets with a BPF:
IPv4 + TCP: (tcp[tcp[12]/16*4]=22 and (tcp[tcp[12]/16*4+5]=1) and (tcp[tcp[12]/16*4+9]=3) and (tcp[tcp[12]/16*4+1]=3))
IPv6 + TCP: (ip6[(ip6[52]/16*4)+40]=22 and (ip6[(ip6[52]/16*4+5)+40]=1) and (ip6[(ip6[52]/16*4+9)+40]=3) and (ip6[(ip6[52]/16*4+1)+40]=3))
Teredo
(IPv6 + TCP over IPv4 + UDP): ((udp[14] = 6 and udp[16] = 32 and udp[17] = 1) and ((udp[(udp[60]/16*4)+48]=22) and (udp[(udp[60]/16*4)+53]=1) and (udp[(udp[60]/16*4)+57]=3) and (udp[(udp[60]/16*4)+49]=3)))
6in4 (IPv6 + TCP over IPv4): (proto 41 and ip[26] = 6 and ip[(ip[72]/16*4)+60]=22 and (ip[(ip[72]/16*4+5)+60]=1) and (ip[(ip[72]/16*4+9)+60]=3) and (ip[(ip[72]/16*4+1)+60]=3)
Complete: (tcp[tcp[12]/16*4]=22 and (tcp[tcp[12]/16*4+5]=1) and (tcp[tcp[12]/16*4+9]=3) and (tcp[tcp[12]/16*4+1]=3)) or (ip6[(ip6[52]/16*4)+40]=22 and (ip6[(ip6[52]/16*4+5)+40]=1) and (ip6[(ip6[52]/16*4+9)+40]=3) and (ip6[(ip6[52]/16*4+1)+40]=3)) or ((udp[14] = 6 and
@LeeBrotherston
LeeBrotherston / gist:412b5cd46d29934cd0f265b2292bf447
Created July 5, 2023 18:30
Make rebase merge fun more palettable for golang 🤣
cat go.mod | grep -Fv '>>>>>>>' | grep -Fv '=======' | grep -Fv '<<<<<<<' > go.mod.tmp && mv go.mod.tmp go.mod && go mod tidy
format = """
$hostname\
$username\
$directory\
[ ](fg:#769ff0 bg:#394260)\
($git_branch$git_status$git_state)\
[ ](fg:#394260 bg:#888888)\
$docker_context\
$golang\
$custom\