Skip to content

Instantly share code, notes, and snippets.

Avatar

Tilman Blumenbach Tblue

View GitHub Profile
@Tblue
Tblue / git-split.sh
Created Aug 30, 2015
Git subtree splitter
View git-split.sh
#!/bin/sh
#
# Git subtree splitter.
#
# Copyright (c) 2014-2015, Tilman Blumenbach
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@Tblue
Tblue / setup.py
Created Jan 8, 2016
setuptools_scm: Include not only the date, but also the time in the "local" part of the version.
View setup.py
from setuptools import setup
setup(
# ...
use_scm_version={
# Include not only the date, but also the time in the "local" part of the version.
# Based on: https://git.io/vuPTX
"local_scheme": lambda version: \
version.format_choice("", "+d{time:%Y%m%d.h%H%M%S}") if version.exact else \
@Tblue
Tblue / svn-clean.py
Last active Jan 16, 2016
Lists and optionally removes untracked and/or ignored files in a SVN working copy.
View svn-clean.py
#!/usr/bin/env python3
#
# List and optionally remove untracked and/or ignored files in a SVN working copy.
#
# Copyright (c) 2015-2016, Tilman Blumenbach
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
@Tblue
Tblue / mozlz4a.py
Last active Nov 1, 2020
MozLz4a compression/decompression utility
View mozlz4a.py
#!/usr/bin/env python
#
# Decompressor/compressor for files in Mozilla's "mozLz4" format. Firefox uses this file format to
# compress e. g. bookmark backups (*.jsonlz4).
#
# This file format is in fact just plain LZ4 data with a custom header (magic number [8 bytes] and
# uncompressed file size [4 bytes, little endian]).
#
# This Python 3 script requires the LZ4 bindings for Python, see: https://pypi.python.org/pypi/lz4
#
You can’t perform that action at this time.