Skip to content

Instantly share code, notes, and snippets.


Andre LaBranche dreness

Block or report user

Report or block dreness

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dreness / Uncloned.swift
Created May 1, 2019
Show something mumble mumble APFS cloned files mumble?
View Uncloned.swift
import Cocoa
func unclonedSize(of url: URL) throws -> off_t {
var list = attrlist(bitmapcount: UInt16(ATTR_BIT_MAP_COUNT),
reserved: 0,
commonattr: 0,
volattr: 0,
dirattr: 0,
fileattr: 0,
dreness /
Created Apr 1, 2019
make a bunch of barcodes
#!/usr/bin/env python3
# make some barcodes, then use ffmpeg to make a video from the individual frames,
# to see how fast FirebaseML can recognize barcodes through the camera.
# barcode types
# code128 code39 ean ean13 ean14 ean8 gs1
# gtin isbn isbn10 isbn13 issn itf jan pzn upc upca
#!/usr/bin/env python3
import json
from beautifulscraper import BeautifulScraper
from pprint import pprint as pp
URL = ""
def seasonClips(URL):
VIDS = []
dreness / mystery_routing.txt
Last active Dec 3, 2018
A routing puzzle for you
View mystery_routing.txt
Question: is there ever a reason to ARP for an IP outside of any local subnets?
Update: I like @bmastenbrook's answer:
# my subnet is a /24, and is totally not on the same /24 as
xomg% netstat -rn -f inet
Routing tables
Destination Gateway Flags Refs Use Netif Expire
default UGScI 3 0 en0
dreness /
Last active Mar 17, 2018
Examine shadowhash data from a DSLocal account record in macOS
if [ -z $1 ]
echo "Requires a username as the first and only argument."
exit 1
readShadowhash() {
dreness /
Created Feb 11, 2018
a few bash techniques for error handling
trap "echo inner ERR" ERR
trap "echo inner EXIT" EXIT
dreness /
Last active Jan 6, 2019
Synthesize and host vlc-x-callback stream links
# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
import os
import socket
from datetime import datetime
from urllib import parse
from klein import Klein
from twisted.web.static import File
from twisted.python.filepath import FilePath
dreness /
Last active Dec 17, 2017
Somebody asked what their second-longest video is :)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import isodate
import time
import math
import json
import sys
import os
from ytdata import YTData
from datetime import datetime
dreness /
Last active Jan 12, 2018
Reveal OverwatchLeague video URLs
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
Work in progress. For now, just show URLs to m3u8 files of match videos.
To use, first do:
pip install -r requirements.txt
TODO: pre-season VODs were split out by game; season1 VODs contain all games in a match
dreness /
Last active Feb 10, 2019
Interrogate LaunchServices to query file paths for default app handler, all possible app handlers, and the UTI
#!/usr/bin/env python
import LaunchServices as ls
from Foundation import NSURL
from sys import argv
for arg in argv[1:]:
url = NSURL.fileURLWithPath_(arg)
if url == None: continue
print("\n", url.path())
You can’t perform that action at this time.