Skip to content

Instantly share code, notes, and snippets.

View rel1c's full-sized avatar
🍊
Ain't life grand?

Adam Peterson rel1c

🍊
Ain't life grand?
  • Minneapolis, MN
View GitHub Profile
@svareille
svareille / PGPparseprivate.py
Created March 12, 2022 10:37
Python script to display raw private PGP keys for importing in OnlyKey
#!/usr/bin/env python
"""
Parse the private keys out of OpenPGP keys (ed25519 or RSA).
It will display the raw subkeys. Only run this on a secure trusted system.
"""
import sys
import argparse
import fileinput
import getpass
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active December 27, 2024 18:58
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@claymcleod
claymcleod / pycurses.py
Last active November 30, 2024 16:08
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()
@rxaviers
rxaviers / gist:7360908
Last active December 27, 2024 15:19
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@jboner
jboner / latency.txt
Last active December 27, 2024 06:40
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