Skip to content

Instantly share code, notes, and snippets.

View nickfloyd's full-sized avatar
🎯
Taking on problems one byte at a time

Nick Floyd nickfloyd

🎯
Taking on problems one byte at a time
View GitHub Profile
@nickfloyd
nickfloyd / recipe: cherry-pick tags
Created December 13, 2010 17:40
To cherry pick from head and commit back into a tag
-from master in working branch
>> git branch [new branch] [tag]
>> git checkout [branch]
-pull commit out and add it to the commit at the top of the tag
>> git cherry-pick [commit] or git cherry-pick [firstcommit]^..[lastcommit] if you have a range
-resolve conflicts
-delete the local tag
>> git git tag -d [tag]
-add a new tag at the head of the old one
>> git tag [tag]
@nickfloyd
nickfloyd / recipe: deleting branches
Created December 13, 2010 17:56
To delete local and remote branches
-delete the remote
>> git push [remote] :[branch]
-delete the local
>> git branch -d [branch]
ex.
git push origin :dev1
git branch -d dev1
@nickfloyd
nickfloyd / Remove the last pushed commit
Created February 3, 2011 14:48
For all of us boneheads out there that push accidental commits
git push -f origin HEAD\^:master
so commit history in the remote looks like:
Had to clean up some things from the merge
nickfloyd (author)
January 26, 2011
commit 4bcce9878c454ba5583c
tree e6f4cffa47b1301a4cfc
@brianlow
brianlow / FindConflictingReferences.cs
Created January 3, 2012 03:04
Find conflicting assembly references
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
namespace MyProject
{
[TestFixture]
@haacked
haacked / TestHelper.cs
Created January 14, 2012 07:25
String Comparison Unit Test Helper
public static class TestHelpers
{
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue)
{
ShouldEqualWithDiff(actualValue, expectedValue, DiffStyle.Full, Console.Out);
}
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue, DiffStyle diffStyle)
{
ShouldEqualWithDiff(actualValue, expectedValue, diffStyle, Console.Out);
@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

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"

@cheeaun
cheeaun / js-error-logging-services.md
Last active December 10, 2023 13:04
JavaScript error logging services
@anaisbetts
anaisbetts / doc.md
Last active December 29, 2015 07:29
The smallest number of WinDbg commands you can know to Do Stuff With VS

File => Attach To Process, pick devenv.exe

First, fix the symbols and shit

.symfix
.reload
.loadby sos clr
@lfender6445
lfender6445 / gist:9919357
Last active June 23, 2024 09:14
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@chadman
chadman / gist:1180f830fd4a2392c4e8
Created November 7, 2015 04:17
Given a specific amount of money on hand, calculate the CC bills to pay off to save the most amount of money a month
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace budget {
public class Program {
static void Main(string[] args) {
var debt = new DebtCalculation(500);