Skip to content

Instantly share code, notes, and snippets.

View atelierbram's full-sized avatar

Bram de Haan atelierbram

View GitHub Profile
@atelierbram
atelierbram / fix-apache-ownership-and-permissions.sh
Created July 10, 2026 11:32
Fix Apache ownership and permissions
sudo chown -R www-data:www-data .
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
@atelierbram
atelierbram / remove-old-node_modules.md
Last active June 24, 2026 14:57
remove old node_modules folders
  npx npkill
@atelierbram
atelierbram / fix-luasnip-jsregexp-not-found-in-neovim.md
Last active April 8, 2026 12:11
Neovim symbol not found: luaopen_jsregexp

Fix: LuaSnip jsregexp "Symbol Not Found" in Neovim

When you receive the warning jsregexp library required for Placeholder-transformations in :checkhealth luasnip, the jsregexp C library needs to be compiled. On modern systems (such as Apple Silicon), this often goes wrong because the library is built for the wrong Lua version.

The Problem

Neovim uses LuaJIT, which is compatible with Lua 5.1. When you install jsregexp via a standard package manager, it is often built for Lua 5.4 or higher. This results in the error message: dlsym(... luaopen_jsregexp): symbol not found.

The Solution (Step-by-step)

  1. Compile for Lua 5.1 Use LuaRocks to build the module specifically for the Lua 5.1 ABI. This ensures that the binary symbols are compatible with Neovim.
@atelierbram
atelierbram / let-remote-server-recognise-ghostty-terminal-using-ssh.md
Created April 3, 2026 15:28
Let remote server recognise ghostty terminal using SSH

Let remote server recognise ghostty terminal using SSH

From the remote server:

  infocmp -a xterm-ghostty

On local machine:

 infocmp -x | ssh remote-server-user@ip "tic -x -"
@atelierbram
atelierbram / _elements.scss
Created April 3, 2026 11:24
CSS reset / starter (in SCSS)
@use "sass:color";
@use "../mq/mq" as *;
// @use "../settings/settings" as *;
@use "../settings/variables" as *;
html {
cursor: auto;
font-size: 16px;
line-height: 1.5;
-moz-tab-size: 2;
@atelierbram
atelierbram / convert-hsl-to-hex-colors-in-batch.md
Created March 10, 2026 08:55
How to convert a range of HSL color values to HEX in batch with color-convert and write to file
@atelierbram
atelierbram / functions.php
Created February 16, 2026 15:03
Colophon section which can be edited in WordPress customizer (GeneratePress child-theme)
<?php // colophon section which can be edited in WordPress customizer (GeneratePress child-theme)
add_action( 'customize_register', function( $wp_customize ) {
$wp_customize->add_section( 'fia_colophon_section', array(
'title' => __( 'Colofon Informatie', 'fia-theme' ),
'priority' => 120,
) );
// Velden configuratie
$fields = array(
@atelierbram
atelierbram / compress-pdf-with-ghostscript.sh
Last active September 15, 2025 08:39
Compress PDF with ghostscript from commandline
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf input.pdf
@atelierbram
atelierbram / cc-css-starter.css
Last active September 13, 2025 12:58
Chris Coyier's CSS Starter
/* https://codepen.io/editor/chriscoyier/pen/0198772a-a759-7dc4-b8fc-1dfdbed39fdb
** https://shoptalkshow.com/681/ */
@layer reset {
html {
color-scheme: light dark;
font:
clamp(1rem, 1rem + 0.5dvw, 2rem) / 1.4 system-ui,
sans-serif;
tab-size: 2;
hanging-punctuation: first allow-end last;
@atelierbram
atelierbram / environment-variables-with-wordpress.md
Last active September 10, 2025 12:41
Environment variables with WordPress PHP

Environment Variables - in wp-config.php

1. In wp-config.php

Add this at the end of the file:

// setup environment
define( 'WP_ENV', 'dev' );     // options: 'dev' or 'prod'
define( 'WP_SERVER', 'local' ); // options: 'local' or 'remote'