Skip to content

Instantly share code, notes, and snippets.

View ches's full-sized avatar
😴
On a slow life break, occasionally attentive

Ches Martin ches

😴
On a slow life break, occasionally attentive
View GitHub Profile
@RyotaUshio
RyotaUshio / Zotero Integration.md
Last active March 18, 2026 19:41
My Template for Obsidian Zotero Integration

{% if attachments -%} PDF: {%- for attachment in attachments | filterby("title", "endswith", ".pdf")%}

  • "[[{{ attachment.title }}]]" {%- endfor %} {%- endif %} {% if accessDate -%} accessDate: {{ accessDate | format('YYYY-MM-DD') }} {%- endif %}
@thoughtpolice
thoughtpolice / jjconfig.toml
Last active September 17, 2026 13:43
my jujutsu config
## ------------------------------------------------------------------------------------------------
# Schema published automatically on the website. This allows TOML language
# servers to autocomplete and show documentation for the entries below.
#
# I use the prerelease version as my builds on my machines are often from trunk.
"$schema" = "https://jj-vcs.github.io/jj/prerelease/config-schema.json"
## ------------------------------------------------------------------------------------------------
## ---- Basic settings
@jdgomeza
jdgomeza / 01-deployment.yaml
Last active December 3, 2024 13:20
Istio OAuth2 Envoy Filter (Okta example)
# Simple httpbin deployment
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
labels:
app: httpbin-auth
app.kubernetes.io/instance: httpbin-auth
name: httpbin-auth
spec:
@deepanchal
deepanchal / starship.toml
Last active January 11, 2026 15:20
Starship config
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
format = """
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
@T3sT3ro
T3sT3ro / .bashrc.profiler
Created September 18, 2022 21:16
bash profiling utility - use it as a custom rcfile to get accurate timings for the whole .bashrc loading process
# Based on https://stackoverflow.com/a/20855353/5555799
# Store this file in ~/.bashrc.profiler and add this alias to your .bashrc:
# alias profilebashstartup='exec bash --rcfile ~/.bashrc.profiler'
TRACEFILE=$(mktemp /tmp/trace.XXX)
TIMINGFILE=$(mktemp /tmp/timing.XXX)
STARTTIME=$(date +%s.%N)
exec 3>&2 2> >( tee $TRACEFILE | sed -u 's/^.*$/now/' | date -f - +%s.%N >$TIMINGFILE)
set -x
@mcroach
mcroach / storing-image-assets-in-repo.md
Last active August 25, 2026 03:13
Using an 'assets' branch to store images in your repo

Storing image assets in your repo and referencing in markdown

Create an assets branch and make the initial commit

git checkout --orphan assets
git reset --hard
cp /path/to/cat.png .
git add .
git commit -m 'Added cat picture'
git push -u origin assets
@guizmaii
guizmaii / AES.scala
Last active October 9, 2023 14:19
Pure and modern AES encryption/decryption in Scala (with PBT tests)
package com.guizmaii.utils
import java.nio.charset.{Charset, StandardCharsets}
import java.security.{Key, SecureRandom}
import cats.effect.Sync
import doobie.{Put, Read}
import eu.timepit.refined.types.all.NonEmptyString
import io.estatico.newtype.macros.newtype
import javax.crypto.{Cipher, SecretKey, SecretKeyFactory}
@april
april / arena-macos-full-screen-fixes.sh
Last active August 25, 2026 19:53
Fixes Magic Arena's broken full screen implementation on macOS
#!/bin/bash
# this forces Arena into full screen mode on startup, set back to 3 to reset
# note that if you go into the Arena "Graphics" preference panel, it will reset all of these
# and you will need to run these commands again
defaults write com.wizards.mtga "Screenmanager Fullscreen mode" -integer 0
defaults write com.wizards.mtga "Screenmanager Resolution Use Native" -integer 0
# you can also replace the long complicated integer bit with any other scaled 16:9
# resolution your system supports.
@cb372
cb372 / io-and-tf.md
Last active June 5, 2023 16:16
IO and tagless final

TL;DR

We should use a type parameter with a context bound (e.g. F[_]: Sync) in library code so users can choose their IO monad, but we should use a concrete IO monad in application code.

Abstracting over IO

If you're writing a library that makes use of effects, it makes sense to use the cats-effect type classes so users can choose their IO monad (IO, ZIO, Monix Task, etc).

So instead of

@zblz
zblz / mlflow_plugin_system_proposal.md
Last active August 17, 2020 09:13
Proposal for plugin system in MLflow

Proposal for a plugin system in MLflow

Motivation

MLflow has an internally pluggable architecture to enable using different backends for both the tracking store and the artifact store. This makes it easy to add new backends in the mlflow package, but does not allow for other packages to provide new handlers for new backends.

This would be useful for several reasons: