Skip to content

Instantly share code, notes, and snippets.

View My MacOS git config (as of July 2021)
[user]
name = YOUR NAME
email = YOUR EMAIL
[core]
editor = code --wait
hooksPath = /Users/YOUR-USER-FOLDER/hooks
mergeoptions = --no-edit
[diff]
tool = p4merge
stat = true
@coridrew
coridrew / gcloud-deis-setup.sh
Created Aug 5, 2020 — forked from dhilipsiva/gcloud-deis-setup.sh
A script to provision GCE for setting up Deis
View gcloud-deis-setup.sh
#! /bin/bash
#
# create_instances.sh
# Copyright (C) 2016 dhilipsiva <dhilipsiva@gmail.com>
#
# Distributed under terms of the MIT license.
#
INSTANCES=3
PREFIX_APP="deisdemo-"
@coridrew
coridrew / Boxstarter-InitialSetup.txt
Created Feb 13, 2017 — forked from cygnull/Boxstarter-InitialSetup.txt
Boxstarter Script for Initial Setup of Windows 10 PC..
View Boxstarter-InitialSetup.txt
# Initial Setup #
#################
#The command to run, built from the raw link of this gist
#START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/cygnull/9546ec8639da7849d3a4098a7ee9a8c7/raw/0ad14b79d360826d83ff462eb072649578ae7d6a/Boxstarter-InitialSetup.txt
#As described here: http://boxstarter.org/Learn/WebLauncher
#########################################
# Set Execution Policy and Disable UAC #
@coridrew
coridrew / happy_git_on_osx.md
Last active Jan 15, 2016 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X
View happy_git_on_osx.md

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@coridrew
coridrew / springer-free-maths-books.md
Created Dec 29, 2015 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
@coridrew
coridrew / pr.md
Last active Dec 6, 2015 — forked from piscisaureus/pr.md
Checkout github pull requests locally
View pr.md
  1. Add global fetch remote for ALL pull requests for all repos:
> git config --global --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"
  1. Now fetch all the pull requests:
$ git fetch origin
@coridrew
coridrew / posh-git timesheet aliases
Created Oct 21, 2014
short & long versions of each. Pipe non-pretty versions to a text file to save like "git ts > coridrew-time.txt"
View posh-git timesheet aliases
[alias]
timesheet = reflog --pretty=format:'(%cd) %h - %d %s [%an]' --abbrev-commit --date-order --date=local --author=coridrew
ts = reflog --pretty=format:'(%cd) %h - %d %s [%an]' --abbrev-commit --date-order --date=local --author=coridrew
timesheetPretty = reflog --pretty=format:'%Cgreen(%cd) %Cred%h%Creset -%C(yellow)%d%Creset %s %C(bold blue) [%an]%Creset' --abbrev-commit --date-order --date=local --author=coridrew
tsp = reflog --pretty=format:'%Cgreen(%cd) %Cred%h%Creset -%C(yellow)%d%Creset %s %C(bold blue) [%an]%Creset' --abbrev-commit --date-order --date=local --author=coridrew
timesheetAll = reflog --pretty=format:'(%cd) %h - %d %s [%an]' --abbrev-commit --date-order --date=local
tsa = reflog --pretty=format:'(%cd) %h - %d %s [%an]' --abbrev-commit --date-order --date=local
View gist:6bee6cceed604e383829
Overview:
1. Client built logging framework
2. Framework uses WMI & "installer(?)" needs to create custom categories ("LogEvent" class inherits from System.Management.Instrumentation.BaseEvent), so must run under full trust.
3. He wants to roll it out to 38 apps/sites, all still on .NET Framework 3.5. Not sure about how many servers host it, but see #4.
4. Overheard question from yesterday was, "I'm trying to build an msi to install on all of the machines, but I can't figure out how to make it install into x64 if machine can handle it, and x86 if machine is not x64"
@coridrew
coridrew / my git config
Last active Nov 18, 2019
w p4merge, notepad++, trayburn aliases & timesheet & bprune alias
View my git config
[user]
name = Firstname Lastname
email = you@example.com
[core]
editor = 'C:\\Program Files (x86)\\Notepad++\\notepad++.exe' -multiInst -notabbar -nosession -noPlugin
[diff]
tool = bc4
[difftool]
View churn.sh
git log --name-only | grep xaml | sort | uniq -c | sort -Descending > xaml-files-by-tfs-commit-count.txt
What it does:
- looks at the git log file, retrieving just the filenames;
- greps to extract xaml filenames;
- sorts the list of files to get the duplicates together;
- eliminates the duplicates but keeps a count of them;
- resorts the file names by that count; and
- writes the list to a txt file named xaml-files-by-tfs-commit-count.txt