Skip to content

Instantly share code, notes, and snippets.

View pashri's full-sized avatar
🌍
Github has statuses?

Patrick Linton pashri

🌍
Github has statuses?
View GitHub Profile
@pashri
pashri / label_bar.py
Created January 6, 2021 23:20
Add value labels to the bars in a bar chart
import pandas as pd
import matplotlib as mpl
def label_bar(
s: pd.Series,
horizontal: bool = False,
**kwargs
) -> mpl.axes.Axes:
"""Creates a Matplotlib bar chart with values in the bars
from a Pandas Series."""
@pashri
pashri / change_mac_address.sh
Created January 6, 2021 23:14
Change MAC address
sudo ifconfig en0 ether <MAC address>
@pashri
pashri / alphabet.md
Created January 2, 2021 20:11
The phonetic alphabet

A Aisle

B Bdellium

C Czar

D Djinn

E Eureka

@pashri
pashri / please.sh
Created January 2, 2021 20:09
Please? (redux)
alias please='sudo $(fc -nl -1)'
@pashri
pashri / Positivity.emoji
Created January 2, 2021 20:08
"Lots of negativity here, let me just plant this flower here to brighten things up"
☀️ ☁️ ☁️
🌈 ☁️
☁️
🌲🌳🌲 🌷 🌲🌳🌲
@pashri
pashri / please.sh
Created January 2, 2021 20:04
Please?
alias please='sudo "$BASH" -c "$(history -p !!)"'
@pashri
pashri / maybe.js
Created January 2, 2021 20:03
true, false, maybe?
Object.defineProperty(window, 'maybe', { get: function() { return Math.random() < 0.5; } });
@pashri
pashri / busy.sh
Created January 2, 2021 19:59
How to look busy
#!/bin/bash
cleanup () {
tput cnorm
exit 0
}
clear
trap cleanup EXIT TERM
tput civis
while true; do