Skip to content

Instantly share code, notes, and snippets.

@potatoboiler
potatoboiler / manual_ssh_copy.sh
Last active March 16, 2023 17:10
rsync/ssh to CSUA servers around OCF
# FILL IN LATER
# SUDO TOUCH TOUCH
# SUDO CHMOD
# SUDO CAT
# SUDO CHMOD
# NON FUNCTIONAL
# $1 is username $2 is path to pub key
mkdir /home/$1/.ssh
touch /home/$1/.ssh/authorized_keys
@potatoboiler
potatoboiler / eduroam.8021x
Last active March 23, 2022 05:02
iwd eduroam config UC Berkeley
# source https://berkeley.service-now.com/kb?sys_kb_id=82206ab51bdab410f2430ed6624bcb4c&id=kb_article_view&sysparm_rank=2&sysparm_tsqueryId=7bce768f1b1ac5103411c918624bcb86
[Security]
EAP-Method=PEAP
[email protected]
# hash obtained from
# echo -n 'WIFIKEY' | iconv -t utf16le | openssl md4
EAP-Password-Hash={hash}
EAP-PEAP-Phase2-Method=MSCHAPV2
EAP-PEAP-Phase2-Identity={username}@berkeley.edu
EAP-PEAP-Phase2-Password={password}
@potatoboiler
potatoboiler / latency.txt
Created March 21, 2022 16:59 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD

Version details

  • C#
  • 1.13
@potatoboiler
potatoboiler / apache2-azure.md
Last active November 22, 2021 10:39
My luck in using Azure VMs to set up a tiny webapp.