Skip to content

Instantly share code, notes, and snippets.

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 March 28, 2023 04:29
Converting a webm file to GIF (using FFmpeg and Gifsicle)
View README.md

Introduction

Sometimes I want to make a screencapture of a websites behaviour.

In Chrome, I am quite happy doing this with the [Awesome Screenshot: Screen Video Recorder][1] extension.

Besides screenshots, the extension offers the ability to make a recording. (Limited to 30 seconds in the free version).

The recording can be uploaded to Youtube or Google Drive. It can also be downloaded as WebM file.

View programming-quotes.md
@Potherca
Potherca / README.md
Last active March 25, 2023 07:53
BASH scripts to go through all the steps to make a (VPS) server more secure.
View README.md
@Potherca
Potherca / README.md
Last active March 15, 2023 09:37
Bookmarklet for Pinguin Radio
View README.md

This gist contains JS code that can be used as a bookmarklet to change the new (awesome!) Pinguin Radio website to only display the audio player.

Before

Screenshot at 2023-03-15

After

Screenshot at 2023-03-15

@Potherca
Potherca / README.md
Last active March 1, 2023 13:45
PHPUnit and PHP version compatibility
View README.md

PHPUnit and PHP version compatibility

This document shows which version of PHPUnit supported which version(s) of PHP.

As stated on the Supported Versions page on the PHPUnit website:

Support means that bugs will be fixed for a version of PHPUnit.

Support for major version X ends two years after its initial release (when major version (X+2) is released).

@Potherca
Potherca / README.md
Last active February 9, 2023 18:30
HOWTO: Skip files outside PhpStorm project in Xdebug sessions
View README.md

Introduction

In PHP development environments, it is not entirely uncommon to use an auto_prepend_file to add development-specific functionality to an application. Usually such a file is used for several projects at the same time. This means the prepend file resides somewhere in a more high-level location.

A more common practice is to use Xdebug te debug PHP code.

When combining these two with PhpStorm this will lead to the prepend file being marked as "not mapped".

Problem

@Potherca
Potherca / pipeline-components-pulls.md
Last active February 9, 2023 12:06
Amount of pulls from docker hub for each of the gitlab pipeline-components.
View pipeline-components-pulls.md

This page shows the amount of pulls each one of the Gitlab Pipeline-Components have received thus far.

Total pulls: 9.70

(List sorting and total updated Februari 2023)

1M+

@Potherca
Potherca / README.md
Last active February 6, 2023 20:09
Feature Toggles in PHP
View README.md

If you look on Packagist, [the most popular packages][1] for [Feature toggles][2] are:

  1. qandidate/toggle "Feature toggling for your PHP application." (⬇️ 496.754 / 362)
  2. opensoft/rollout "Feature switches or flags for PHP" (⬇️ 354.269 / 215)
  3. flagception/flagception "Feature toggle on steroids." (⬇️ 139 265 / 24)
  4. joshuaestes/feature-toggle "Provides feature toggle functionality" (⬇️ 61.736 / 32)
  5. zumba/swivel "Strategy driven feature toggles" (⬇️ 49.954 / 211)

Downloads Stars

@Potherca
Potherca / README.md
Last active February 6, 2023 18:16
The search for a Regex to match BEM CSS class-names
View README.md

The search for a Regex to match BEM CSS class-names

TL;DR

Use this regular expression to match BEM class-names:

^\.[a-z]([a-z0-9-]+)?(__([a-z0-9]+-?)+)?(--([a-z0-9]+-?)+){0,2}$
@Potherca
Potherca / compile-lynx-wasm.sh
Last active January 19, 2023 14:22
Steps to compile the Lynx web browser to Web Assembly
View compile-lynx-wasm.sh
# Sources used in figuring this out:
#
# - https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm
# - https://emscripten.org/docs/compiling/Building-Projects.html#building-projects
# Set up Emscripten SDK
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk/
./emsdk install latest
./emsdk activate latest