Skip to content

Instantly share code, notes, and snippets.

View stewemetal's full-sized avatar

István Juhos stewemetal

View GitHub Profile
@nckroy
nckroy / faleshoods-programmers-believe-about-names.md
Last active April 11, 2024 12:34
Falsehoods Programmers Believe About Names

Falsehoods Programmers Believe About Names


By Patrick McKenzie (patio11) (original location: https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/)

John Graham-Cumming wrote an article today complaining about how a computer system he was working with described his last name as having invalid characters. It of course does not, because anything someone tells you is their name is — by definition — an appropriate identifier for them. John was understandably vexed about this situation, and he has every right to be, because names are central to our identities, virtually by definition.

I have lived in Japan for several years, programming in a professional capacity, and I have broken many systems by the simple expedient of being introduced into them. (Most people call me Patrick McKenzie, but I’ll acknowledge as correct any of six different “full” names, any many systems I deal with will accept precisely none of them.) Similarly, I’ve worked with Big Freaki

@zjeaton
zjeaton / _Google Analytics 4 with Hugo.md
Last active May 23, 2024 01:13
Google Analytics 4 (with Measurement ID) in Hugo

Google Analytics 4 in Hugo

Blog post with slightly more detail can be found here. If you want to just get to it, read on.

I (very) recently decided to reimplement GA in my site, and found that existing implementation in Hugo was not compatible with GA4's new Measurement ID. This is an easy way to drop your Measurement ID into your site. I'm not going to go into how to sign up for GA.

This implementation requires that you create a site parameter for analytics, create a partial, and call the partial. I tweaked the names of the parameters and files so they didn't collide with the built-in hugo code.

Place the GoogleAnalyicsID (Measurement ID) in config.toml within [params].

@khongi
khongi / .env
Last active February 19, 2024 02:37
Sonarr + Radarr + Jackett + qBittorrent + ddclient cloudflare DNS update + Traefik reverse proxy with LetsEncrypt on Docker
QBITTORRENT_PATH=<PATH>
QBITTORRENT_WEBUI_PORT=<PORT>
DOWNLOAD_PATH=<PATH>
MEDIA_PATH=<PATH>
JACKETT_PATH=<PATH>
SONARR_PATH=<PATH>
RADARR_PATH=<PATH>
DOMAIN=<YOUR DOMAIN>
TZ=<Timezone e.g. Europe/Budapest>
USERDIR=<HOME DIR PATH>
@richard-flosi
richard-flosi / flutter-netlify-build.sh
Last active July 1, 2023 21:15
Netlify Build command script to deploy a Flutter Web App
#!/bin/sh
FLUTTER_BRANCH=`grep channel: .metadata | sed 's/ channel: //g'`
FLUTTER_REVISION=`grep revision: .metadata | sed 's/ revision: //g'`
git clone https://github.com/flutter/flutter.git
cd flutter
git checkout $FLUTTER_BRANCH
git pull origin $FLUTTER_BRANCH
git checkout $FLUTTER_REVISION
cd ..