Skip to content

Instantly share code, notes, and snippets.

View ElijahLynn's full-sized avatar
😎
All Your DevOps Belong To Us

Elijah Lynn ElijahLynn

😎
All Your DevOps Belong To Us
View GitHub Profile
@willurd
willurd / web-servers.md
Last active March 29, 2024 02:15
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

FWIW: I (@Rondy) am not the author of the content presented here, which is an outline from Edmond Lau's book. I've just copy-pasted it from somewhere and saved as a personal gist, before it got popular on newsnews.ycombinator.com. I don't remember where exactly the original source is from and neither could find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

@pesterhazy
pesterhazy / indexeddb-problems.md
Last active March 26, 2024 15:58
The pain and anguish of using IndexedDB: problems, bugs and oddities

This gist lists challenges you run into when building offline-first applications based on IndexedDB, including open-source libraries like Firebase, pouchdb and AWS amplify (more).

Note that some of the following issues affect only Safari. Out of the major browsers, Chrome's IndexedDB implementation is the best.

Backing file on disk (WAL file) keeps growing (Safari)

When this bug occurs, every time you use the indexeddb, the WAL file grows. Garbage collection doesn't seem to be working, so after a while, you end up with gigabytes of data.

Random exceptions when working with a large number of indexeddb databases (Safari)

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active March 22, 2024 23:37
What I Wish I'd Known About Equity Before Joining A Unicorn

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

top (the UNIX process inspector) cheat sheet

This is a list of the most helpful keyboard commands I use within top.

The basics

h shows help on interactive commands. Also see the top manual page

q to quit the program.

@klaaspieter
klaaspieter / ASS.md
Created June 22, 2017 07:59 — forked from anonymous/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

Pipewire is the replacement for JACK and PulseAudio, Pipewire allows low latency compared to any pulseaudio tweaks
Here is a short list of what you should do to get the lowest latency in Osu!
Higher audio rate equals less latency always, unless you increase your quantum
to calculate node latency for your audio device take the quantum size divided by your audio rate
so 64/96000 = 0.00066666666 * 1000 = 0.6ms this is 0.6ms node latency
To check client latency use pw-top, take the quantum size and the audio rate of the client then use quantum / audio rate * 1000
to get overall latency for the client
@mislav
mislav / pagination.md
Created October 12, 2010 17:20
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o

@danielrw7
danielrw7 / replify
Last active October 24, 2023 12:03
replify - Create a REPL for any command
#!/bin/sh
command="${*}"
printf "Initialized REPL for `%s`\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
do
eval "$command $input"
printf "%s> " "$command"