Skip to content

Instantly share code, notes, and snippets.

@bouassaba
bouassaba / Monaco for Powerline.otf
Created January 24, 2016 16:22 — forked from baopham/Monaco for Powerline.otf
Patched font Monaco for OSX Vim-Powerline
@bouassaba
bouassaba / gist:d8954ef64ebf24a26635
Created December 5, 2015 16:10
fix bower command not found issue
$ npm config set prefix /usr/local
$ npm install -g bower
@bouassaba
bouassaba / libpng.sh
Created November 7, 2015 20:48 — forked from dulacp/libpng.sh
Download & Compile Libpng for iOS (all architectures)
# Builds a Libpng framework for the iPhone and the iPhone Simulator.
# Creates a set of universal libraries that can be used on an iPhone and in the
# iPhone simulator. Then creates a pseudo-framework to make using libpng in Xcode
# less painful.
#
# To configure the script, define:
# IPHONE_SDKVERSION: iPhone SDK version (e.g. 8.1)
#
# Then go get the source tar.bz of the libpng you want to build, shove it in the
# same directory as this script, and run "./libpng.sh". Grab a cuppa. And voila.
@bouassaba
bouassaba / png_build.sh
Created November 7, 2015 20:48 — forked from wuhao5/png_build.sh
build libpng for iOS/MacOS X
rm -rf install_*
rm -rf output-*
# build simulator
./configure --prefix=`pwd`/install_i386 CFLAGS="-Ofast -mios-version-min=5.0" LDFLAGS="-flto" CC="xcrun -sdk iphonesimulator clang -arch i386"
make clean && make -j8 && make install
./configure --prefix=`pwd`/install_x86_64 CFLAGS="-Ofast -mios-version-min=5.0" LDFLAGS="-flto" CC="xcrun -sdk iphonesimulator clang -arch x86_64"
make clean && make -j8 && make install
@bouassaba
bouassaba / gist:a12e9a135a01f2232fec
Created October 23, 2015 10:24
iOS Debug Log Macro
#define DEBUG_MODE
#ifdef DEBUG_MODE
#define DebugLog( s, ... ) NSLog( @"<%p %@:(%d)> %@", self, [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
#else
#define DebugLog( s, ... )
#endif
@bouassaba
bouassaba / gist:27d01849fa2bb79b3935
Created October 17, 2015 23:12
Ubuntu show CPU and RAM info
cat /proc/cpuinfo
grep MemTotal /proc/meminfo
@bouassaba
bouassaba / gist:b4f126df02947adb90f4
Created September 20, 2015 21:52
VBox Additions Cent OS 7
yum install gcc kernel-devel kernel-headers dkms make bzip2 perl
KERN_DIR=/usr/src/kernels/`uname -r`
export KERN_DIR
@bouassaba
bouassaba / remove_duplicates.sh
Created August 26, 2015 10:17
Remove duplicates from file
cat file.txt | sort | uniq -d
@bouassaba
bouassaba / cpp-netlib-0.11.1-final-build.bat
Created July 11, 2015 21:18
cpp-netlib 0.11.1-final build.bat
cmake.exe -G "Visual Studio 12" -DBOOST_ROOT:string="C:\Developer\boost_1_55_0" -DBOOST_LIBRARYDIR:string="C:\Developer\boost_1_55_0\lib32-msvc-12.0"^
-DOPENSSL_ROOT_DIR:string="C:\Developer\openssl-0.9.8k_WIN32" -DOPENSSL_INCLUDE_DIR="C:\Developer\openssl-0.9.8k_WIN32\include" -DOPENSSL_LIBRARIES="C:\Developer\openssl-0.9.8k_WIN32\lib"^
..\cpp-netlib-0.11.1-final
@bouassaba
bouassaba / git_remote_update.sh
Created June 17, 2015 14:05
git remote update
git remote update -p