Skip to content

Instantly share code, notes, and snippets.

View nsmith5's full-sized avatar

Nathan Smith nsmith5

View GitHub Profile
@nsmith5
nsmith5 / capture.sh
Created December 6, 2021 21:44
Grabbing a packet capture
# SSH to your remote machine
ssh host.example.com
# Install tcpdump if its not already available
apt install -y tcpdump
# Record a network packet capture
sudo tcpdump -w your-capture.pcap
# You can also narrow this down a low like this. Google around for the right command to filter
@nsmith5
nsmith5 / keybase.md
Created May 9, 2020 16:59
Keybase Proof

Keybase proof

I hereby claim:

  • I am nsmith5 on github.
  • I am nfsmith (https://keybase.io/nfsmith) on keybase.
  • I have a public key ASDG19No18k1JcbJLbCe12sapOHgimwy9zBN54mLysEobgo

To claim this, I am signing this object:

@nsmith5
nsmith5 / install.sh
Last active June 23, 2020 21:00
Kubeadm + Containerd + Flannel + Fedora
# Steps to bring up kubeadm + containerd on Fedora 29
# First up, install containerd + containernetworking-plugins
dnf install containerd containernetworking-plugins crictl
# Set up CNI configuration
mkdir -p /etc/cni/net.d
cat >/etc/cni/net.d/10-mynet.conf <<EOF
{
"cniVersion": "0.2.0",
"name": "mynet",
@nsmith5
nsmith5 / no-power-save.sh
Created July 20, 2017 20:27
Surface Pro 3 Wifi Fix
#!/bin/sh
# Write to /etc/NetworkManager/dispatcher.d/no-power-save
# Fixes wifi stability issues associated with marvell driver
# and kernel power management
# source: https://bugzilla.kernel.org/show_bug.cgi?id=109681#c66
# MDJ
IFACE=$1
ACTION=$2
using PyPlot
function make_figure(arr)
fig = figure()
ax = fig[:add_subplot](111)
imag = ax[:imshow](arr)
fig[:savefig]("output.png")
plt[:close](fig)
return nothing
end
import matplotlib.pyplot as plt
import numpy as np
import sys
def make_figure(arr):
fig = plt.figure()
ax = fig.add_subplot(111)
imag = ax.imshow(arr)
plt.savefig("output2.png")
plt.close(fig)