Skip to content

Instantly share code, notes, and snippets.

Avatar
🦄
What a mess I've made

Stephen Jennings jennings

🦄
What a mess I've made
View GitHub Profile
@jennings
jennings / biggitstuff.sh
Created May 22, 2013
Lists all objects in a Git database and lists them in descending order of size.
View biggitstuff.sh
# From: http://naleid.com/blog/2012/01/17/finding-and-purging-big-files-from-git-history/
git rev-list --objects --all | sort -k 2 > allfileshas.txt
git gc && git verify-pack -v .git/objects/pack/pack-*.idx | egrep "^\w+ blob\W+[0-9]+ [0-9]+ [0-9]+$" | sort -k 3 -n -r > bigobjects.txt
for SHA in `cut -f 1 -d\ < bigobjects.txt`; do
echo $(grep $SHA bigobjects.txt) $(grep $SHA allfileshas.txt) | awk '{one=$1; three=$3;$1=$2=$3=$4=$5=$6=""; print one,three,$0}' >> bigtosmall.txt
done;
@jennings
jennings / combine-unrelated-branches.sh
Last active Dec 17, 2015
Tools I'm using to join a few unrelated repositories into one
View combine-unrelated-branches.sh
#!/bin/sh
# Combines together unrelated branches into the current commit.
#
# Usage: combine-unrelated-branches.sh <merge-head>+
#
# combine-unrelated-branches.sh repo1/stuff repo2/stuff
NEW_TREE=$(mktemp -t $(basename $0))
@jennings
jennings / AtlassianWidthTweaks.md
Last active Dec 31, 2015
Makes the repository selectors in Bitbucket wider so long repository names don't get cut off. Works in Chrome or (hopefully) Firefox with Greasemonkey.
View AtlassianWidthTweaks.md

Chrome installation

  1. Click here
  2. Click OK on the warning, the file will be downloaded.
  3. Open chrome://extensions and drag the downloaded file onto the extensions page.

Firefox installation

  1. Install Greasemonkey
  2. Click here and install the script.
View keybase.md

Keybase proof

I hereby claim:

  • I am jennings on github.
  • I am jennings (https://keybase.io/jennings) on keybase.
  • I have a public key ASAr3xJbZmMFK6kV8HoTTo1vRKFb4PjLj55jcdht_igINAo

To claim this, I am signing this object:

@jennings
jennings / Windows10-Setup.ps1
Last active May 6, 2016 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
View Windows10-Setup.ps1
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
View words.md

High availability

Process

  • Mirroring
  • Replication

Components

  • Principal / Replica
@jennings
jennings / jspretty.cmd
Created Jan 19, 2017
Reads JSON from STDIN, formats it, and prints it to STDOUT.
View jspretty.cmd
@echo off
node "%~dp0\jspretty.js"
@jennings
jennings / TableSizes.sql
Last active Feb 6, 2017
Get size of all tables in a SQL Server database
View TableSizes.sql
-- Adapted from: http://stackoverflow.com/a/7892349/19818
SELECT *
FROM (
SELECT
name AS TableName,
'(FILESTREAM)' AS SchemaName,
0 AS RowCounts,
size / 8 AS TotalSpaceKB,
size / 8 as UsedspaceKB,
@jennings
jennings / software-lifecycle-services.md
Last active Apr 26, 2017
Software Lifecycle Services
View software-lifecycle-services.md
View enumerable.js
function Enumerable(arr) {
this.toArray = function () {
return arr
}
this.filter = function (fn) {
return new Enumerable(arr.filter(fn))
}
this.map = function (fn) {
You can’t perform that action at this time.