Skip to content

Instantly share code, notes, and snippets.

View virtadpt's full-sized avatar
💭
First thing that Microsoft does when buying Github: Add statuses. Whee.

The Doctor virtadpt

💭
First thing that Microsoft does when buying Github: Add statuses. Whee.
View GitHub Profile
@virtadpt
virtadpt / gist:4ddc52baf8714f56f4e33e1f0fb82fa5
Created March 29, 2026 03:23 — forked from atcuno/gist:3425484ac5cce5298932
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

@virtadpt
virtadpt / index.md
Created March 18, 2026 01:28 — forked from aparrish/index.md
Getting credentials for the Mastodon API with Mastodon.py. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/

Getting credentials for the Mastodon API with Mastodon.py, step by step

Making a bot? Making a bot in Python? Making a bot in Python that uses the Mastodon API? If so, chances are you need to get some credentials. Here's how I did it!

(The following tutorial uses Python 2.7, but if you're using Python 3+ everything should work substantially the same.)

Mastodon.py authentication

I just started using it, but it looks like Mastodon.py is a pretty great library for working with the Mastodon API! However, all of the authentication examples use static files to store credentials, which I don't like—I'm afraid I'll accidentally push them to Github. I like to keep my authentication as close to the actual command that runs the program as possible, so usually I pass them on the command line to the script running my bot. To do this, I need to get the appropriate credentials on their own, as separate strings that I can cut and paste.

@virtadpt
virtadpt / thunderbolt-networking-guide.md
Created May 27, 2025 04:45 — forked from geosp/thunderbolt-networking-guide.md
Thunderbolt Networking Setup on Linux

Thunderbolt Networking Setup on Linux

This guide documents the steps to enable and configure Thunderbolt networking on your Linux system (e.g., Ubuntu, Proxmox). It covers loading the necessary kernel modules, ensuring persistent interface naming, configuring a fixed IP address, and testing throughput with iperf3. Note that Thunderbolt 3/4 hardware advertises a raw bandwidth of 40 Gbps, but practical throughput is typically lower due to half‑duplex operation, protocol overhead, and system constraints.

Hardware Used in This Guide

This guide was developed and tested with the following hardware:

  • CPU: AMD Ryzen 9 PRO 6950H
    • 8 cores / 16 threads
  • 3.3 GHz base frequency / 4.94 GHz boost
@virtadpt
virtadpt / readme.md
Created May 12, 2025 09:35 — forked from eddiewebb/readme.md
Hugo JS Searching with Fuse.js
@virtadpt
virtadpt / hopeless
Created March 14, 2025 22:42 — forked from xero/hopeless
dante's infernal motd ansi art
#!/bin/bash
cat << X0

/ \ ‾‾‾ ‾___ ‾‾ ‾‾‾‾‾ ‾‾‾ ‾‾‾ ‾‾‾‾\/‾‾‾ ‾ ‾‾‾‾‾‾‾‾\
( __| ( / \ / / _ |
\ ) | //--/ / _ _ __/ _ _ / \ / /  |
: // (_ /‾) (_\ / ) (_/ (_)/ ) //--/ / / |
x . _ ‾‾ // (_ / /  :
0 | ' ) / _ |
: | //--/ _ _ _ ' ) / _ |
@virtadpt
virtadpt / HIT_HMD2043.txt
Created April 22, 2024 16:41 — forked from DanielKeep/HIT_HMD2043.txt
Harold Innovation Technologies - HMD2043 and HMU1440 spec sheets
HIT_HMD2043
__ __
|| ||
||==|| I T
_|| ||_
Harold Innovation Technologies
"If it ain't a HIT, it's a piece of..."
@virtadpt
virtadpt / postgres-cheatsheet.md
Created March 20, 2024 19:24 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@virtadpt
virtadpt / you-dont-need-a-blockchain.md
Created August 29, 2023 20:41 — forked from joepie91/you-dont-need-a-blockchain.md
You Don't Need A Blockchain

You don't need a blockchain.

If you're reading this, you probably suggested to somebody that a particular technical problem could be solved with a blockchain.

Blockchains aren't a desirable thing; they're defined by having trustless consensus, which necessarily has to involve some form of costly signaling to work; that's what prevents attacks like sybil attacks.

In other words: blockchains must be expensive to operate, to work effectively. This makes it a last-resort solution, when you truly have no other options available for solving your problem; in almost every case you want a cheaper and less complex solution than a blockchain.

In particular, if your usecase is commercial, then you do not need or want trustless consensus. This especially includes usecases like supply chain tracking, ticketing, and so on. The whole *p

@virtadpt
virtadpt / s3fs.service
Created July 26, 2023 22:29 — forked from klutchell/s3fs.service
systemd unit file for s3fs fuse auto-mount
Description=S3FS FUSE mount
Documentation=https://github.com/s3fs-fuse/s3fs-fuse
Wants=network-online.target
After=network-online.target
AssertPathIsDirectory=/mnt/s3fs
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/s3fs mybucket:/bucketdir /mnt/s3fs -o url=https://nyc3.digitaloceanspaces.com -o use_cache=/tmp -o allow_other -o use_path_request_style -o uid=1000 -o gid=1000
@virtadpt
virtadpt / config_file_and_command_line_arguments.py
Created April 14, 2023 18:55 — forked from gene1wood/config_file_and_command_line_arguments.py
An example of how to use a config file which is overridden by command line arguments in Python.
#!/usr/bin/env python
import ConfigParser
import argparse
import logging
import os
def type_loglevel(level):
try:
result = getattr(logging, level.upper())