Skip to content

Instantly share code, notes, and snippets.

;;; djot.el -*- lexical-binding: t -*-
;; Copyright (C) 2024 John MacFarlane
;; Author: John MacFarlane <[email protected]>
;; Keywords: lisp djot
;; Version 0.0.1
;;; Commentary:
@LukeMathWalker
LukeMathWalker / audit.yml
Last active April 26, 2025 03:29
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:

Rust Error Handling Cheatsheet - Result handling functions

Introduction to Rust error handling

Rust error handling is nice but obligatory. Which makes it sometimes plenty of code.

Functions return values of type Result that is "enumeration". In Rust enumeration means complex value that has alternatives and that alternative is shown with a tag.

Result is defined as Ok or Err. The definition is generic, and both alternatives have

@gusmacaulay
gusmacaulay / shell.nix
Last active May 2, 2025 19:54 — forked from lightdiscord/shell.nix
Postgresql/Postgis inside nix-shell with sqitch and default postgres user
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "postgresql-inside-nixshell";
buildInputs = [
glibcLocales
(pkgs.postgresql.withPackages (p: [ p.postgis ]))
sqitchPg
pgcli
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 5, 2025 08:14
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@drj42
drj42 / org-mode-reference-in.org
Created February 6, 2012 23:53
This is a cheat sheet for Emacs org-mode... in org-mode format!