Skip to content

Instantly share code, notes, and snippets.

View yavuztas's full-sized avatar
🏠
Working from home

Yavuz Tas yavuztas

🏠
Working from home
View GitHub Profile
@jiulongw
jiulongw / FastByteArrayCompare.cs
Created September 14, 2014 20:34
Fast Byte Array Compare
/// <summary>
/// Compare if given two byte arrays are identical.
/// </summary>
/// <param name="x">byte array to compare.</param>
/// <param name="y">byte array to compare.</param>
/// <returns>true if x and y are identical.</returns>
public unsafe static bool ByteArrayCompare(byte[] x, byte[] y)
{
if (x == null || y == null || x.Length != y.Length)
{
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream