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 / 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();
@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 / 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};
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 / .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:
#
public class Single
{
public static readonly Single Instance = new Single();
private Single()
{
}
}
package ru.inn.autotests.pixelwars.scenaries;
import ru.inn.autotests.pixelwars.common.BaseTestScenarioController;
import ru.inn.autotests.pixelwars.common.Debugger;
import ru.inn.autotests.pixelwars.common.PrConstants;
import ru.inn.autotests.pixelwars.common.entities.PixelUser;
import ru.inn.autotests.pixelwars.common.user.RequestFactory;
import ru.inn.autotests.pixelwars.common.user.UserFactory;
import ru.inn.autotests.pixelwars.protos.GameObject;
import ru.inn.autotests.pixelwars.protos.Result;
#!/bin/sh
# add a simple 'nuget' command to Mac OS X under Mono
# get NuGet.exe binary from http://nuget.codeplex.com/releases/view/58939
# get Microsoft.Build.dll from a Windows .NET 4.0 installation
# copy to /usr/local/bin and Robert is your father's brother....
#
PATH=/usr/local/bin:$PATH
mono --runtime=v4.0 /usr/local/bin/NuGet.exe $*
@AgiosAndreas
AgiosAndreas / gist:5294857
Created April 2, 2013 18:31
Sync Skype Chat History on Multiple Machines With Dropbox
# Quit the Skype application
pkill Skype
# Move the "main" Skype chat history files to the Dropbox directory
mv ~/Library/Application\ Support/Skype ~/Dropbox/
# Create a symlink from the original folder to the Dropbox folder
ln -s ~/Dropbox/Skype/ ~/Library/Application\ Support/Skype
Console.WriteLine("Hello world!");