Skip to content

Instantly share code, notes, and snippets.

View iambmelt's full-sized avatar

Brian Melton-Grace iambmelt

  • Microsoft
  • Seattle, WA
  • 03:02 (UTC -07:00)
View GitHub Profile
@iambmelt
iambmelt / gist:dbb5bef7ed8b3fb61ce5
Created November 3, 2015 18:38 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@iambmelt
iambmelt / ss_certgen.sh
Created October 26, 2015 22:05
Generate a cert
#!/usr/bin/env bash
OUT=.tmp;
CERT=server.crt
KEY=server.key
CSR=server.csr;
# Complexity
CMP=2048
@iambmelt
iambmelt / .gitignore
Created October 16, 2015 00:49
Windows, OS X, Linux, Vim, VSCode - all ignored
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
@iambmelt
iambmelt / brz-gearing.txt
Last active April 13, 2016 03:23
Subaru BRZ Gearing | Maximum Speeds
1st: 30 mph
2nd: 55 mph
3rd: 80 mph
4th: 100 mph
5th: 125 mph
6th: 145 mph (drag-limited)
git remote prune <remote>
@iambmelt
iambmelt / gist:89380af5f1dbd3c1e049
Created October 13, 2015 17:17
Create empty commit
git commit --allow-empty -m "Commit msg here"
@iambmelt
iambmelt / gist:42c5398f58cf736435b3
Created October 7, 2015 23:04
Nuke Git History
# Remove the current .git
rm -rf .git
# Reconstruct the repo
git init
git add .
git commit -m "Initial commit"
# Push it
git remote add origin <uri>
@iambmelt
iambmelt / gist:2dd3195966359f2ede3f
Created October 7, 2015 22:57
Git - Ignore changes to a tracked file
git update-index --assume-unchanged <file>
send(to, from, count)
register short *to, *from;
register count;
{
register n = (count + 7) / 8;
switch(count % 8) {
case 0: do { *to = *from++;
case 7: *to = *from++;
case 6: *to = *from++;
case 5: *to = *from++;