Skip to content

Instantly share code, notes, and snippets.

View tyzhnenko's full-sized avatar

Dmytro tyzhnenko

  • Ukraine, Kharkiv
View GitHub Profile
#!/bin/bash
# The script can copy part of TimeMachine folders from one to another place.
# In the way like TM does. Next folder contains just difference.
# Unfortunatry the target folder will take more space. Becase of rsync doesn't support hard links for folders.
BYPASS=/System/Library/Extensions/TMSafetyNet.kext/Contents/Helpers/bypass
RSYNC=/usr/local/bin/rsync # Path to rsync. By default in MacOS it's version 2.
RSYNC2_ARGS="--extended-attributes"
RSYNC3_ARGS="--xattrs --acls --crtimes --one-file-system --numeric-ids"
RSYNC_ARGS="--archive --progress -P --human-readable --update --stats --verbose --inplace"
@tyzhnenko
tyzhnenko / server.py
Created February 17, 2020 18:36
Mock for JSON auto-index Nginx generator
#!/usr/bin/env python3
import sys
import io
import os
import urllib
import html
import json
import time
import contextlib