Skip to content

Instantly share code, notes, and snippets.

View jmalonzo's full-sized avatar
📈
(ノ´・ω・)ノ ミ Ⅎoɔ∩sIuƃ

Jan Alonzo jmalonzo

📈
(ノ´・ω・)ノ ミ Ⅎoɔ∩sIuƃ
View GitHub Profile
@jmalonzo
jmalonzo / PythonRemoval.md
Last active September 22, 2024 03:17
Manually removing Python installed from the official installer (OS X)
@jmalonzo
jmalonzo / proxmox-ssl-cert-error.md
Last active September 10, 2022 13:00
When you upload the wrong certificate to Proxmox

Steps

  1. SSH into the proxmox server
  2. Remove the offending certificate in /etc/pve/local (e.g. pveproxy-ssl.pem)
  3. Run pvecm updatecerts --force
  4. Restart pveproxy systemctl restart pveproxy
  5. Refresh the web UI in the browser

References

Keybase proof

I hereby claim:

  • I am jmalonzo on github.
  • I am jmalonzo (https://keybase.io/jmalonzo) on keybase.
  • I have a public key whose fingerprint is 154A 1731 7226 5926 6F05 BBAB 15B9 23C8 AD61 224D

To claim this, I am signing this object:

@jmalonzo
jmalonzo / settings.json
Last active August 10, 2020 01:18
My VSCode settings
{
"editor.fontLigatures": true,
"editor.fontFamily": "'Cascadia Code', 'Fira Code', Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 12,
"python.insidersChannel": "off",
"terminal.integrated.shell.osx": "/usr/local/bin/fish",
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"workbench.preferredDarkColorTheme": "Material Theme Palenight High Contrast",

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@jmalonzo
jmalonzo / geocode.gs
Created January 15, 2017 05:50
Geocode custom function for Google Sheets
/**
* Geocode address using Google Maps
*
* @param address the address to geocode
* @return the geocoded address (possibly approximate)
*/
function geocode(address) {
var response = Maps.newGeocoder().geocode(address);
var geom = response.results[0].geometry;
return geom.location.lat + ", " + geom.location.lng;

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@jmalonzo
jmalonzo / downgradephantomjsbrew.md
Last active March 12, 2017 20:56
Download phantomjs brew package

How to downgrade homebrew packages (e.g. phantomjs 1.9.2 -> 1.9.1)

$ brew uninstall phantomjs
$ brew versions phantomjs
$ git checkout 2196213 /usr/local/Library/Formula/phantomjs.rb
$ brew install phantomjs