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
@mortenson
mortenson / spotify_focuser.applescript
Last active September 15, 2025 22:50
AppleScript to slowly lower Spotify volume when you're not working, to incentivize being more productive! 🧠
# spotify_focuser.applescript
# An AppleScript script that decreases Spotify volume while you're not using work related apps and websites.
# by Samuel Mortenson
# To install, download this script and open it in Script Editor, then select File > Export and export the script as an Application with "Stay open after run handler" checked. Now you can run the exported Application and GET BACK TO WORK!
# You shouldn't normally run random AppleScript or give it permissions, so uh read the code first before doing something dumb.
# Other notes:
# - Volume is only changed when a song is playing
# - Volume does not change while Spotify is open, to stay neutral about whether or not that is work related
@ElijahLynn
ElijahLynn / gist:d76d31eca63d984efa424b08dee2905b
Last active October 8, 2024 20:15
Remote tcpdump stream to wireshark

Archived from https://twitter.com/ElijahLynn/status/1144399526452588545

Just had to debug yum returning a 503 on a server deep in a private network, but curl worked fine. Was able to use tshark and pipe it to my local wireshark and re-assemble the HTTP request that finally told me it was blocked by the internet gateway and who to email!

Here is the command that piped in realtime the tshark dump to my local wireshark GUI. Don't worry about the CLI filter because we can just use display filters to get what we want. Then find a GET packet, right click and "Follow" > TCP||HTTP Stream

ssh user@host 'sudo /usr/sbin/tshark -i eth0 -f "port !22" -w -' | wireshark -k -i -

Ahh, the only reason this worked was because the URL was http. Need to figure out how to do https now.

Veterans from all eras are reacting to the events in Afghanistan, such as the U.S withdrawal and the takeover by the Taliban.

You are not alone. Veterans may question the meaning of their service or whether it was worth the sacrifices they made. They may feel more moral distress about experiences they had during their service. It’s normal to feel this way. Talk with your friends and families, reach out to battle buddies, connect with a peer-to-peer network, or sign up for mental health services. Scroll down for a list common reactions and coping advice.

Resources available right now Veterans Crisis Line - If you are having thoughts of suicide, call 1-800-273-8255, then PRESS 1 or visit http://www.veteranscrisisline.net/ For emergency mental health care, you can also go directly to your local VA medical center 24/7 regardless of your discharge status or enrollment in other VA health care. Vet Centers - Discuss how you feel with other Veterans in these community-based counseling centers. 70% of Vet Center sta

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

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
@pesterhazy
pesterhazy / indexeddb-problems.md
Last active November 17, 2025 06:44
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)

@dvf
dvf / change-codec.md
Last active December 5, 2025 20:23
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active December 6, 2025 12:31
Conventional Commits Cheatsheet
@tylers-username
tylers-username / .env
Last active August 3, 2021 22:05
Install Blackfire on Lando & Automatically Configure
####
## Blackfire config - `lando rebuild` required
####
BLACKFIRE_CLIENT_ID=b5ee8ca3-****-****-****-5d227546a4c0
BLACKFIRE_CLIENT_TOKEN=3a2b88cbfb*******************************22763
BLACKFIRE_SERVER_ID=4b8ac335-****-****-****-b34439207732
BLACKFIRE_SERVER_TOKEN=98f7fdf4b12b7**************************12b837cf080d
@rubenrivera
rubenrivera / GoTo.gs
Created May 2, 2018 02:58
Go To Macro. Shows a prompt on which the user set the address of cell to quickly jump into.
// Related Q&A https://webapps.stackexchange.com/q/116736/88163
function GoTo() {
var spreadsheet = SpreadsheetApp.getActive();
var Ui = SpreadsheetApp.getUi();
var buttons = Ui.ButtonSet.OK_CANCEL;
var response = Ui.prompt('Go to', 'Where do you want to go?', buttons);
if(response.getSelectedButton() === Ui.Button.OK){
var address = response.getResponseText();
spreadsheet.getRange(address).activateAsCurrentCell();
}