Skip to content

Instantly share code, notes, and snippets.

@dannberg
dannberg / obsidian-meeting-template.txt
Last active March 13, 2024 14:44
Dann Berg's Meeting template for Obsidian. Full implementation instructions here: https://dannb.org/blog/2023/obsidian-meeting-note-template/. See the YouTube tutorial here: https://youtu.be/Ud16HOQoS5Q
---
date: <% tp.file.creation_date() %>
type: meeting
company:
summary: " "
---
tags: [[🗣 Meetings MOC]]
Date: [[<% tp.date.now("YYYY-MM-DD-dddd") %>]]
<% await tp.file.rename(tp.date.now("YYYY-MM-DD") + " " + tp.file.title) %>
# [[<% tp.date.now("YYYY-MM-DD") + " " + tp.file.title %>]]
@dannberg
dannberg / obsidian-people-template.txt
Last active April 24, 2024 05:27
Dann Berg's People Template for Obsidian. Uses Dataview & Templater plugins. Should be saved as a Markdown file in Obsidian. See full tutorial for setup instructions: https://dannb.org/blog/2022/obsidian-people-note-template/
---
company:
location:
title:
email:
website:
aliases:
---
tags:: [[👥 People MOC]]
@dannberg
dannberg / obsidian-daily-note-template.txt
Last active May 2, 2024 19:35
Dann Berg's Daily Note Template for Obsidian. Uses Dataview & Templater plugins. Should be saved as a Markdown file in Obsidian. Read the full tour: https://dannb.org/blog/2022/obsidian-daily-note-template/
---
created: <% tp.file.creation_date() %>
---
tags:: [[+Daily Notes]]
# <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %>
<< [[Timestamps/<% tp.date.now("YYYY", -1) %>/<% tp.date.now("MM-MMMM", -1) %>/<% tp.date.now("YYYY-MM-DD-dddd", -1) %>|Yesterday]] | [[Timestamps/<% tp.date.now("YYYY", 1) %>/<% tp.date.now("MM-MMMM", 1) %>/<% tp.date.now("YYYY-MM-DD-dddd", 1) %>|Tomorrow]] >>
---
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 3, 2024 10:52
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@orhun
orhun / arch_linux_installation.md
Last active April 20, 2024 02:56
Notes on my Arch Linux installation: UEFI/Secure Boot + systemd-boot, LUKS-encrypted root (XFS), LUKS-encrypted swap (with hibernate & unlocked via TPM)
@plammens
plammens / unionenum.py
Last active November 10, 2023 18:39
Enum union in Python
"""
Enum union based on and compatible with the standard library's `enum`.
"""
# MIT License
#
# Copyright (c) 2020 Paolo Lammens
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@wonderbeyond
wonderbeyond / fields.py
Last active February 15, 2023 13:13
Generic foreign key field for peewee based on postgresql's jsonb type, with Inter-Model-Identifier(IMID) support.
import six
from peewee import Model, FieldAccessor
from playhouse.postgres_ext import BinaryJSONField
class GForeignKeyAccessor(FieldAccessor):
def get_rel_instance(self, instance):
value = instance.__data__.get(self.name)
model_name = value['model']
rel_model = self.field.allowed_types[model_name]
@Jaza
Jaza / _flask_security_confirm_change_email.md
Last active June 7, 2018 12:10
Flask-Security with "confirm change of email" functionality

Flask-Security with "confirm change of email" functionality

A simple Flask app to demonstrate Flask-Security with "confirm change of email" functionality added.

To try it out locally:

pip install -r requirements.txt
python app.py
@thebopshoobop
thebopshoobop / example_usage.sh
Last active December 3, 2021 07:13
A simple utility function for enforcing mutual exclusivity between click options.
$ python single_context_mutually_exclusive.py -a
$ python single_context_mutually_exclusive.py -b
$ python single_context_mutually_exclusive.py -a -b
Usage: single_context_mutually_exclusive.py [OPTIONS]
Error: options a, b, and c are mutually exclusive
$ python single_context_mutually_exclusive.py -b -c
Usage: single_context_mutually_exclusive.py [OPTIONS]
Error: options a, b, and c are mutually exclusive
$ python single_context_mutually_exclusive.py -a -b -c
Usage: single_context_mutually_exclusive.py [OPTIONS]
@Skyross
Skyross / task_with_lock.py
Last active February 5, 2024 05:51
Celery Task with lock
from celery import Task
from django.conf import settings
from django.core.cache import caches
from celery.utils.log import get_task_logger
logger = get_task_logger(__name__)
# noinspection PyAbstractClass
class TaskWithLock(Task):
"""