Skip to content

Instantly share code, notes, and snippets.

View adyp's full-sized avatar

Adrian Penișoară adyp

View GitHub Profile
@kriswill
kriswill / vcprompt.py
Created August 24, 2018 19:26
vcprompt
#!/usr/bin/env python
"""
Usage: vcprompt [options]
Version control information in your prompt.
Attribution: possible original author <Matthias Riegler https://github.com/xvzf>?
Options:
-f, --format FORMAT The format string to use.
@adyp
adyp / allocator.c
Last active December 5, 2017 23:12
Memory allocator tester
#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);
#!/bin/bash
main() {
REMOTES="$@";
if [ -z "$REMOTES" ]; then
REMOTES=$(git remote);
fi
REMOTES=$(echo "$REMOTES" | xargs -n1 echo)
CLB=$(git branch -l|awk '/^\*/{print $2}');
echo "$REMOTES" | while read REMOTE; do