Skip to content

Instantly share code, notes, and snippets.

View igorski89's full-sized avatar

Igor Ievsiukov igorski89

  • Lausanne, Switzerland
View GitHub Profile
#include <stdio.h>
void func(int *a) {
printf("%lu\n",sizeof(a)/sizeof(int));
}
void func1(int a[]) {
printf("%lu\n",sizeof(a)/sizeof(int));
}
@igorski89
igorski89 / ios-universal-staticlib
Created March 2, 2012 16:35
Building iOS universal(simulator + device) static libraries
# Version 2.0 (updated for Xcode 4, with some fixes)
# Changes:
# - Works with xcode 4, even when running xcode 3 projects (Workarounds for apple bugs)
# - Faster / better: only runs lipo once, instead of once per recursion
# - Added some debugging statemetns that can be switched on/off by changing the DEBUG_THIS_SCRIPT variable to "true"
# - Fixed some typos
#
# Purpose:
# Create a static library for iPhone from within XCode
# Because Apple staff DELIBERATELY broke Xcode to make this impossible from the GUI (Xcode 3.2.3 specifically states this in the Release notes!)
@igorski89
igorski89 / gist:2182448
Created March 24, 2012 12:56
My .bash_profile
#export PATH=/usr/local/bin:/usr/local/sbin/:$PATH
export NODE_PATH=/usr/local/lib/node_modules
export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/share/python:$PATH
#alias mate='open -a TextMate.app'
export EDITOR="/usr/local/bin/mate -w"
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
@igorski89
igorski89 / .gitconfig
Created March 25, 2012 13:48
.gitconfig
[user]
name = Igor Evsukov
email = igor.evsukov@gmail.com
[alias]
st = status
co = checkout
ci = commit
br = branch
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
wip = "git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit -m \"wip\""
@igorski89
igorski89 / .gitconfig
Created June 20, 2012 12:40
git confing
[alias]
st = status
ci = commit
co = checkout
di = diff
dc = diff --cached
amend = commit --amend
aa = add --all
ff = merge --ff-only
pullff = pull --ff-only
https://gist.github.com/4223810