SPC q q
- quitSPC w /
- split window verticallySPC w
- - split window horizontallySPC 1
- switch to window 1SPC 2
- switch to window 2SPC w c
- delete current windowSPC TAB
- switch to previous bufferSPC b b
- switch buffers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[letterpaper,11pt]{article} | |
\usepackage[margin=1in,footskip=0.25in]{geometry} | |
\usepackage{titlesec} % tbh i forgot why this is here | |
\usepackage[parfill]{parskip} % this makes paragraph indentation consistent | |
\usepackage{amsthm, amssymb, amsmath} % math packages | |
\newcommand{\sectionbreak}{\clearpage} % optional: this pagebreaks at every section | |
% optional: common shorthands | |
\newcommand{\bb}[1]{\mathbb{#1}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Blocking version with `run` | |
output = subprocess.run(['ls', '-l'], capture_output=True).stdout.decode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w, h = 8, 8 | |
fig, ax = plt.subplots(w, h, sharex='col', sharey='row', figsize=(20,20)) | |
for i in range(w*h): | |
a = ax[i//h][i%w] | |
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dd bs=4M if={PATH_TO_ISO} of=/dev/{DEVICE} conv=fdatasync status=progress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
valgrind --tool=callgrind ./{} | |
./gprof2dot.py -f callgrind callgrind.out.{} | dot -Tsvg -o output.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget --recursive -e robots=off --random-wait --user-agent=Mozilla/5.0 http://example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
//STUFF | |
std::ofstream fileout; | |
fileout.open("filename.txt", std::ios_base::app); | |
fileout << "hello world"; | |
//STUFF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
/* | |
* ... | |
*/ | |
auto start = std::chrono::high_resolution_clock::now(); | |
/* | |
* do stuff | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r = requests.get(url, headers={ | |
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36' | |
}) |
NewerOlder