Skip to content

Instantly share code, notes, and snippets.

Avatar

Nathan Smith nsmith5

View GitHub Profile
View keybase.md

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 Jun 23, 2020
Kubeadm + Containerd + Flannel + Fedora
View install.sh
# 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 Jul 20, 2017
Surface Pro 3 Wifi Fix
View no-power-save.sh
#!/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
View figures.jl
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
View figures.py
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)