Skip to content

Instantly share code, notes, and snippets.

View ccamel's full-sized avatar
🧙‍♂️
Coding for the commons, crafting for the curious.

Chris ccamel

🧙‍♂️
Coding for the commons, crafting for the curious.
View GitHub Profile
@evaera
evaera / Clean Code.md
Last active August 14, 2025 16:19
Best Practices for Clean Code
  1. Use descriptive and obvious names.
    • Don't use abbreviations, use full English words. player is better than plr.
    • Name things as directly as possible. wasCalled is better than hasBeenCalled. notify is better than doNotification.
    • Name booleans as if they are yes or no questions. isFirstRun is better than firstRun.
    • Name functions using verb forms: increment is better than plusOne. unzip is better than filesFromZip.
    • Name event handlers to express when they run. onClick is better than click.
    • Put statements and expressions in positive form.
      • isFlying instead of isNotFlying. late intead of notOnTime.
      • Lead with positive conditionals. Avoid if not something then ... else ... end.
  • If we only care about the inverse of a variable, turn it into a positive name. missingValue instead of not hasValue.
@mordrax
mordrax / phd-elm-19-upgrade.md
Last active July 14, 2021 01:27
Upgrade to elm 0.19

This gist started Wednesday 29th August. We have until Friday 7th September to upgrade to Elm 0.19. This is a bunch of notes which I'm keeping track of to eventually turn into an article later on. Hope it helps your upgrade.

Day 1

Pre upgrade

428 Elm files.

@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active August 21, 2025 05:33
Conventional Commits Cheatsheet

(This is a fork of Michael's original gist with some editing of the unions + records sections.)

Elm and Typescript: comparison of type checking features

Each of these examples assume the usage of --strict mode in Typescript

Enums

Elm

Can be implemented using “Custom Types”

@br3ndonland
br3ndonland / github-actions-notes.md
Last active August 11, 2025 07:34
Getting the Gist of GitHub Actions
@Willmo36
Willmo36 / comonad.ts
Created December 14, 2020 18:24
fp-ts comonad with example
import { Comonad2C } from 'fp-ts/lib/Comonad';
import { pipe } from 'fp-ts/lib/function';
import { FunctionN } from 'fp-ts/lib/function';
import { Monoid } from 'fp-ts/lib/Monoid';
import { NonEmptyArray } from 'fp-ts/lib/NonEmptyArray';
import { pipeable } from 'fp-ts/lib/pipeable';
/**
* OOP style builder pattern but in FP
* References:
@maratori
maratori / .golangci.yml
Last active August 20, 2025 04:17
Golden config for golangci-lint
# This file is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021-2025 Marat Reymers
## Golden config for golangci-lint v2.4.0
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt it to suit your needs.
# If this config helps you, please consider keeping a link to this file (see the next comment).
@jpigree
jpigree / merge_dependabot-prs
Last active October 30, 2021 15:03
Merge dependabot prs. Useful when having a lot of those PRs across multiple repositories on Github. Need to clone all target repositories in same directory first.
#!/bin/bash -e
REPO_DIR="$(realpath ${1:-.})"
for repo in $(find "$REPO_DIR" -mindepth 1 -maxdepth 1 -type d)
do
if [ ! -d "$repo/.git" ]
then
echo "Skipping $repo. Not a git repo"
continue
@ccamel
ccamel / #my-configuration-files.md
Last active January 6, 2025 21:48
🗂 My various configuration files

Various configuration files for my working environment

Note

My configuration files have retired gracefully and found a new home at chez-ccamel. They’re now managed with the delightful chezmoi config tool.

@ad2ien
ad2ien / Gihub-scripts_accept_pr.sh
Last active January 5, 2023 07:24
Create a PR adding a file in several projects
#! /bin/bash
set -eu
BRANCH=''
ORG='okp4'
USER=ad2ien
REPOS=$(gh repo list ${ORG} --source --limit 150 --no-archived --json name --template '{{range .}}{{ .name }} {{end}}')
echo $REPOS