Skip to content

Instantly share code, notes, and snippets.

View nk9's full-sized avatar
🏗️
Building a better world, one bit at a time

Nick Kocharhook nk9

🏗️
Building a better world, one bit at a time
  • London, UK
View GitHub Profile
@nk9
nk9 / cfnetwork-map.json
Created February 5, 2015 13:38
This is a JSON mapping of CFNetwork versions to OS X versions. It's been culled from UserAgent strings.
{
"CFNetwork/1.1": "10.2",
"CFNetwork/1.2.1": "10.3.2",
"CFNetwork/1.2.2": "10.3.9",
"CFNetwork/1.2.6": "10.3.9",
"CFNetwork/128": "10.4.0 (PPC)",
"CFNetwork/128": "10.4.1 (PPC)",
"CFNetwork/128.2": "10.4.2 (PPC)",
"CFNetwork/129.10": "10.4.4",
"CFNetwork/129.10": "10.4.5",
@nk9
nk9 / largestFiles.py
Last active November 14, 2023 09:47
Python script to find the largest files in a git repository.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Python script to find the largest files in a git repository.
# The general method is based on the script in this blog post:
# http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
#
# The above script worked for me, but was very slow on my 11GB repository. This version has a bunch
# of changes to speed things up to a more reasonable time. It takes less than a minute on repos with 250K objects.
#
#!/bin/sh
set -e
cd "$(git rev-parse --show-cdup)"
# Find all the objects that are in packs:
if [ "$(ls -A .git/objects/pack)" ]
then