Skip to content

Instantly share code, notes, and snippets.

@bstreiff
bstreiff / predictable_serial_port_names.md
Last active January 8, 2025 03:24
Predictable Serial Port Names

[NOTE: this is mostly a collection of notes and not quite a specification nor an implementation thereof]

Predictable Serial Port Names

"How do I identify what I should open() for my RS-232 or RS-485 serial port?" is a surprisingly difficult question to answer on Linux.

You might think that "/dev/ttyS0, /dev/ttyS1, etc are my serial ports in order, right?" and the answer to that is Maybe.

@wikiti
wikiti / !FAB-CLAIM-README.md
Last active January 8, 2025 03:23
A script to automatically add all Quixel MegaScans items to your FAB account

Important

As per the beginning of 2025, Quixel assets are no longer free to claim, so this script is not useful anymore.

Note

This script was built for educational purposes. Due to how FAB APIs are built to handle search pagination, all assets might not be claimable through this script. With the last script update, a total of ~600 scanned pages, with ~14k assets. Please note that, by clicking on the "Claim All" quixel button, you'll already have claimed all assets for future free usage, beyond 2024 (official response). This script simply makes sure that assets are added to a library.

Script to add all quixel megascan items to your FAB account

As quixel megascan items will stop being free after 2024. So, this script will go through all Quixel MegaScan items and add them to your account. Quixel would be working on a tool to automatically add all resources to you

@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 8, 2025 03:23
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@tomjnixon
tomjnixon / README.md
Created October 7, 2017 17:32
get a list of user-installed packages given an OPKG status file/output from an OpenWRT/LEDE device

This is not intended to be run on-device, but it might be usefull as part of a backup/upgrade process.

Packages are listed that:

  • are not depended on by any other package
  • were not installed within 5 minutes of the kernel (which can't be upgraded without building a new image)

Obviously this is a quick hack, YMMV.

Usage

@mprostock
mprostock / dataloader_mem_leak_copy-on-access_problem.ipynb
Created December 10, 2018 10:32
"Memory Leak" copy-on-access problem in pytorch dataloaders
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@subfuzion
subfuzion / curl.md
Last active January 8, 2025 03:21
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@greird
greird / slack-files-downloader.sh
Last active January 8, 2025 03:21
Download all files from a Slack workspace export folder.
#!/bin/bash
#
# This script will browse a Slack export folder and download all files in a new /export folder
#
# HOW TO:
# 1. As a Workspace admin, download an export of your Slack history (https://www.slack.com/services/export)
# 2. Make sure you have jq installed (https://stedolan.github.io/jq/)
# 3. Place this file at the root of your Slack export folder, next to channels.json
# 4. Run `bash slack-files-downloader.sh` in your terminal
#
@anvaka
anvaka / 00.Intro.md
Last active January 8, 2025 03:19
npm rank

npm rank

This gist is updated daily via cron job and lists stats for npm packages:

  1. Top 1,000 most depended-upon packages
  2. Top 1,000 packages with largest number of dependencies
  3. Top 1,000 packages with highest PageRank score
@davidfowl
davidfowl / MinimalAPIs.md
Last active January 8, 2025 03:14
Minimal APIs at a glance