Skip to content

Instantly share code, notes, and snippets.

View Potherca's full-sized avatar
🤔
I wonder what this button does…

Ben Peachey Potherca

🤔
I wonder what this button does…
View GitHub Profile
@Potherca
Potherca / README.md
Last active January 20, 2026 15:16
BASH scripts to go through all the steps to make a (VPS) server more secure.
@Potherca
Potherca / FUNDING.yml
Last active January 5, 2026 20:05
Potherca FUNDING.yml file for on Github
# These are supported funding model platforms
github: [Potherca] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: Potherca # Replace with a single Patreon username
open_collective: Potherca # Replace with a single Open Collective username
ko_fi: Potherca # Replace with a single Ko-fi username
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: Potherca # Replace with a single Liberapay username
issuehunt: Potherca # Replace with a single IssueHunt username
@Potherca
Potherca / README.md
Created December 24, 2025 16:20
🔨 Bash Shorts 🩳: How to redirect output to a protected file (a.k.a.“sudo echo”)

🔨 Bash Shorts 🩳: “sudo echo” (or “How to redirect output to a protected file”)

Why sudo echo "something" > /path/to/protected/file.txt doesn’t work and what to do instead.

If you are working on the command-line and you want to write output to a file, sooner or later you come up with this command: echo "output" > file.

This is called a “Redirection”. This works wonderfully and you go on your merry way.

Sometime later, you need to do the same thing with a protected file.

@Potherca
Potherca / README.md
Last active December 23, 2025 03:08
Use `array_walk` instead of `foreach`.md -- Potherca's rules for creating more robust code in PHP
@Potherca
Potherca / programming-quotes.md
Last active November 9, 2025 19:38
Programming Quotes (source: http://www.defprogramming.com)
@Potherca
Potherca / README.md
Last active October 9, 2025 09:06
Searching for a generic documentation block convention to use with BASH

Documentation block tags conventions for BASH

For most languages a single standard for documenting functions and methods in block comments (a.k.a. doc-blocks) has emerged.

For BASH, however, there does not seem to be a definitive convention. Several competing conventions exist, which made me think:

Could a list of doc-block tags be distilled from those used across all (or most) languages?

Time to find out!

@Potherca
Potherca / index.html
Last active October 4, 2025 18:49
Het kabinet Schoofs deed er 223 dagen over om zich te formeren, om vervolgens 337 dagen te regeren, waarna het 149 dagen demissionair was.
<!doctype html>
<meta name="description" content="Het kabinet Schoofs deed er 223 dagen over om zich te formeren, om vervolgens 337 dagen te regeren, waarna het 149 dagen demissionair was.">
<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://gist.pother.ca/a1c14a6758e3bf36768c90f43f4fb13b/">
<meta property="og:type" content="website">
<meta property="og:title" content="Kabinet Schoofs I - Formeren vs. Regeren">
<meta property="og:description" content="Het kabinet Schoofs deed er 223 dagen over om zich te formeren, om vervolgens 337 dagen te regeren, waarna het 149 dagen demissionair was.">
<meta property="og:image" content="https://i.imgur.com/XiT6dE5.png">
@Potherca
Potherca / README.md
Last active September 25, 2025 10:19
BASH script to clone all git repository in a Group on GitLab, or Organization on GitHub.

Introduction

Starting at a new employer always mean checking out various git repositories.

As the amount of repositories a company has grows, the time needed to clone all of those repositories also grows.

This script automates this task.

In order for this script to work, a personal access token is needed.

@Potherca
Potherca / OIDC-core.md
Last active September 2, 2025 14:54
All the figures/diagrams from various OAuth2 related specs and standrds.

OpenID Connect Core

Abstract Flow

+--------+                                   +--------+
|        |                                   |        |
|        |---------(1) AuthN Request-------->|        |
|        |                                   |        |
|        |  +--------+                       |        |