Skip to content

Instantly share code, notes, and snippets.

View AgiosAndreas's full-sized avatar
⌨️
Working

Andrei Gaevskii AgiosAndreas

⌨️
Working
View GitHub Profile
@AgiosAndreas
AgiosAndreas / .git-completion.bash
Created May 18, 2012 13:51
Git autocompletion
#!bash
#
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
source ~/.git-completion.bash
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/'
}
function proml {
case $TERM in
xterm*)
@AgiosAndreas
AgiosAndreas / uninstall-mono.sh
Created December 26, 2011 16:21
This script removes Mono from an OS X System. It must be run as root
#!/bin/sh -x
#This script removes Mono from an OS X System. It must be run as root
rm -r /Library/Frameworks/Mono.framework
rm -r /Library/Receipts/MonoFramework-*
for dir in /usr/bin /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man5; do
(cd ${dir};
@AgiosAndreas
AgiosAndreas / build-monodevelop-mac-os-x.sh
Created December 14, 2011 10:15
Building MonoDevelop from sources on OS X
#!/bin/bash
git checkout newresolver
export PATH="/Library/Frameworks/Mono.framework/Versions/Current/bin:$PATH"
export ACLOCAL_FLAGS="-I /Library/Frameworks/Mono.framework/Versions/Current/share/aclocal"
export PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Home/lib/pkgconfig
export DYLD_FALLBACK_LIBRARY_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib:/lib:/usr/lib
./configure --profile=mac
@AgiosAndreas
AgiosAndreas / gist:913377
Created April 11, 2011 11:24
Calculate multiline UILabel height
UILabel label = new UILabel(new RectangleF(0,0,250,0));
label.Font = UIFont.FromName("Marker Felt", 18F);
label.Lines = 0;
label.Text = "This general topic has been asked here multiple times: how to render UITableViewCells";
label.SizeToFit();