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 <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#define DEFAULT_UNIT 1024*1024 /* 1Mb */ | |
size_t alloc_unit; | |
char* format_size(unsigned long int); |
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
exec 0>&- # close stdin | |
# and execute command without STDIN control... |
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 SVN info in prompt, if possible | |
PROMPT_COMMAND=svn_prompt_cmd | |
svn_prompt_cmd() { | |
# The various escape codes that we can use to color our prompt. | |
RED="\e[0;31m" | |
GREEN="\e[0;32m" | |
BROWN="\e[0;33m" | |
BLUE="\e[0;34m" |
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 | |
# | |
# Source: https://gist.github.com/bsdcon/7224196 | |
# Original: https://gist.github.com/habibutsu/5420781 | |
# Modified by Adrian Penisoara << ady+tailurl (at) bsdconsultants.com >> | |
# | |
# Last update: 8 Aug 2014 | |
# |