Skip to content

Instantly share code, notes, and snippets.

View Cushychicken's full-sized avatar
🍩

Nash Reilly Cushychicken

🍩
View GitHub Profile
@Cushychicken
Cushychicken / digikey-component-data-bookmarklet.md
Created May 2, 2024 12:47
Javascript bookmarklet to extract component data from a Digikey page.

Here's a Javascript bookmarklet that will extract component data from Digikey, for when you're building a bill of materials.

Saves just a little bit of copy/paste.

javascript:(function() {
    var url = window.location.href.toLowerCase();
    var dist = url.includes("digikey") ? "DigiKey" : url.includes("mouser") ? "Mouser" : "";
    var fieldMapping = {
        "DigiKey Part Number": "DistPN",
@Cushychicken
Cushychicken / ScopeCapture.md
Last active May 23, 2020 15:52
Easily Grab Agilent Scope Shots Using Python

Easily Screencap Agilent Scopes

Grabbing scope shots has always been a pain in the ass. First it was the shitty Tektronix scopes my alma mater used: you needed a floppy disk to get shots. (Read that again. Floppy drive. FUCK.) Then it was slightly less shitty scopes at an internship that were USB stick enabled. Better. Not great, but better. Now, I'm employed, and got my boss to cash out for one of these beauties. (Scope, how do I love thee; let me count the ways...) It has the perk of being web enabled, but it's still a hassle to get the scope shot.

Navigate to a webpage? Click a button? Right click and "Save Target As"?! You've got to be fucking kidding me.

There is a better way. Guido made Python so lazy people's lives are easy. You can run this as a standalone script to save your .png in the current working directory; if you run it from iPython, like