Skip to content

Instantly share code, notes, and snippets.

agaviria / Ledger_3_commands.dat
Created August 10, 2012 20:03
Collection of ledger-cli commands
# comments example for .dat or .ledger files
; This is a single line comment,
# and this,
% and this,
| and this,
* and this.
# If you have a deeply nested tree of accounts,
# it may be convenient to define an alias, for example:
simonmichael / accounts.txt
Last active May 30, 2023 09:43
a sample *ledger chart of accounts (first 3 levels): combined personal & business, eg for a freelancer
accounts receivable
accounts receivable
simon-weber /
Last active November 24, 2018 21:52
Custom tooling to ease management.
import vcrutils
VCR_CASSETTE_PATH = APPROOT + '/venmo_tests/cassettes/' # eg
@dual_decorator # convert a paramaterized decorator for no-arg use (
def external_call(*args, **kwargs):
"""Enable vcrpy to store/mock http requests.
andreif /
Last active May 8, 2024 00:17
A simple unix/linux daemon in Python

A simple unix/linux daemon in Python



by Sander Marechal

I've written a simple Python class for creating daemons on unix/linux systems. It was pieced together for various other examples, mostly corrections to various Python Cookbook articles and a couple of examples posted to the Python mailing lists. It has support for a pidfile to keep track of the process. I hope it's useful to someone.

# Hello, and welcome to makefile basics.
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
# Once you're done here, go to
# to learn SOOOO much more.
davecranwell /
Last active December 16, 2020 21:37
Responsive image tag for Wagtail CMS
from django import template
from django.template import Context
from django.template.base import parse_bits
from wagtail.wagtailimages.templatetags.wagtailimages_tags import ImageNode
from wagtail.wagtailimages.models import Filter, SourceImageIOError, InvalidFilterSpecError
from britishswimming.utils.models import SocialMediaSettings
register = template.Library()
bhouse /
Created February 8, 2016 23:41
Centos 7.2.1511 via systemd-nspawn

Make a directory to install CentOS 7.2.1511 in

[root@localhost ~]# mkdir /centos_chroot

Make a directory for the rpm database

[root@localhost ~]# mkdir -p /centos_chroot/var/lib/rpm

Create the RPM database

alirobe / reclaimWindows10.ps1
Last active May 27, 2024 21:14
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of (different defaults). N.…
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### iwr -useb | iex
josh-padnick /
Last active May 24, 2024 09:09
Run ssh-agent via fish shell
# Convert ssh-agent output to fish shell
eval "$(ssh-agent)" >/dev/null
runekaagaard /
Last active July 4, 2022 15:41 — forked from voldmar/
List all signals by model and signal type. Tested with Django 1.7.
# coding:utf-8
import gc
import inspect
import ctypes
from collections import defaultdict
from import BaseCommand
from django.db.models.signals import *