Skip to content

Instantly share code, notes, and snippets.

@dancarroll
dancarroll / BinarySearch in C#
Created April 23, 2010 07:21
Trying to write a binary search without testing
static int BinarySearch(int[] array, int target)
{
int high = array.Length - 1;
int low = 0;
int mid = (high + low) / 2;
while (high >= low)
{
if (array[mid] == target)
{
@dancarroll
dancarroll / fabfile.py
Created March 11, 2010 00:57 — forked from heckj/fabfile.py
Fork of heckj's fabfile for my own use
#!/usr/bin/env python
from __future__ import with_statement # needed for python 2.5
from fabric.api import *
from fabric.contrib.console import confirm
# ================================================================
# NOTE:
# using this fabfile expects that you have the python utility
# fabric installed locally, ssh access to reamea.com, and your
# ssh public key associated with the account 'mboza@reamea.com'