This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Removes gaps between the diff block by fusing the lines into the diff. | |
* | |
* $diff: A diff created by computeDiff. | |
* $minGaps: a number specifying the smallest allowable gap between two diff blocks. | |
* | |
* Returns a new diff (see computeDiff for details.) | |
*/ | |
function removeDiffGaps($diff, $minGaps) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <assert.h> | |
#include <string.h> | |
/** | |
* Tokenizes string. | |
* | |
* str [in]: pointer to a zero terminated string. Required | |
* token [out]: pointer to an user specified buffer to hold the token. The user must ensure the buffer is long enough. Required. | |
* delimiter [in]: the character that delimits the tokens. (eg. space). Shouldn't be '\0'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <stdio.h> | |
#include <set> | |
#include <vector> | |
// INTERFACE | |
class GcObject; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
YEAR=`date +%Y` | |
echo "YEAR: $YEAR" | |
MONTH=`date +%m` | |
echo "MONTH: $MONTH" | |
DAY=`date +%d` | |
echo "DAY: $DAY" | |
mkdir -p $YEAR/$MONTH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 1 ] | |
then | |
echo "Usage $0 <directory>" | |
exit | |
fi | |
DIR=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROMPT_COLOR=${PROMPT_COLOR:-'\[\033[01;38;5;56m\]'} | |
VIRTUAL_ENV_DISABLE_PROMPT=1 | |
function prompt_command() | |
{ | |
local EXIT=$? | |
# Color codes | |
local PROMPT_COLOR=${PROMPT_COLOR:-'\[\033[01;35m\]'} | |
local RESET_COLOR='\[\033[00m\]' |