Skip to content

Instantly share code, notes, and snippets.

Fonts to Use for English Posters: Practical Picks That Always Work

When you design an English-language poster, two things matter more than anything else: legibility from a distance and a clear typographic hierarchy (headline vs. body vs. captions). Below is a practical, low-risk font guide you can apply to academic posters, business posters, and event signage.


The simplest answer (a safe default pairing)

If you want a combination that rarely fails:

A Simple Python Tool for Controlled PDF Text Extraction (PyPDF)

This script is a compact, command-line Python program designed to extract text from PDF files in a controlled and predictable way. Built on top of the pypdf library, it focuses on reliability rather than visual layout, making it suitable for preprocessing documents before analysis or conversion.

At its core, the program reads a PDF page by page and collects text fragments directly from the content stream. Font-based filtering can be enabled to extract only text rendered with specific font names and sizes, but by default the filter is disabled so that all text is captured.

Key behaviors are implemented to improve readability of the output and reduce common PDF artifacts:

  • Optional filtering by exact font name and font size with tolerance
  • Automatic insertion of line breaks after periods

Copy Multiple Files to Markdown with One Script for GitHub Gist

This JavaScript snippet is a self-invoking utility designed to collect multiple file entries from a web page and copy them to the clipboard as a clean, Markdown-formatted document. It is especially useful when working with interfaces that display several editable files, such as code editors or snippet managers.

  • It scans the page for elements marked as files.
  • For each file, it extracts the displayed file name and its text content.
  • It wraps each file’s content in Markdown-style code fences.
  • It combines all files into a single Markdown string, separated by blank lines.
  • It copies the final result directly to the clipboard using a temporary textarea.

Using Windows Name Resolution for SSH in WSL1 Alpine

When using the standard Windows SSH client together with tmux, some users occasionally see unwanted “noise” characters appear in the terminal. One practical workaround is to run SSH from a WSL1 Alpine environment instead of using the Windows-native SSH session.

However, WSL1 Alpine has a key limitation in this setup: it cannot resolve certain hostnames (notably those relying on mDNS). To address this, the approach described here offloads hostname resolution to Windows—where resolution works correctly—and then feeds the resolved IP address back into the SSH command running inside Alpine.

Background and Design

The solution consists of two small tools working together:

Workaround for Certbot Installation on Raspbian 11 (Bullseye) armv7l with Python 3.9

Pin Dependencies to Avoid pip Install Failures

On Raspbian 11 (Bullseye) running on armv7l, installing Certbot via pip under Python 3.9 can fail due to build and dependency compatibility issues. A practical workaround is to pin versions explicitly so pip resolves a known-good combination. In particular, locking cffi to a compatible release helps prevent compilation or wheel resolution errors that block Certbot installation.

Use the following approach to proceed reliably:

pip install "cffi<2.0.0" certbot

Git Pull and Divergent Branches: Choosing Merge, Rebase, or Fast-Forward

If you’ve recently run:

git pull

…and Git responded with a message like:

Automating TLS Certificate Renewal with systemd and acme.sh

Automating TLS Certificate Renewal with systemd and certbot

Safely Backing Up and Restoring iptables and ip6tables Rules on Linux

When experimenting with firewall rules, it is essential to have a reliable way to revert to a known-good configuration. This article explains how to save the current iptables / ip6tables state, apply temporary changes, and restore the original rules if needed.

All commands shown below must be executed with root privileges.


1. Backing Up the Current Firewall Rules

Block Outbound Traffic for a Specific Linux User with iptables (While Keeping Listening Ports Working)

In some environments you may want to prevent a particular local user from initiating outbound network connections, while still allowing that user to run services that listen on ports and respond to inbound connections. This can be achieved with iptables by blocking only NEW outbound connections from that user, while allowing ESTABLISHED/RELATED traffic to continue.

This article shows a clean, minimal ruleset to accomplish that goal.

Goal

For userA: