Skip to content

Instantly share code, notes, and snippets.

@gwijayas
gwijayas / gist:7355665
Created November 7, 2013 14:41
compile youcompleteme
cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=/opt/llvm33 . ~/.vim/bundle/YouCompleteMe/cpp
@gwijayas
gwijayas / gist:8333907
Last active January 2, 2016 16:59
vim YouCompleteMe clang support with system version of clang
cmake -G "Unix Makefiles" -DUSE_SYSTEM_LIBCLANG=ON . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
make ycm_support_libs
@gwijayas
gwijayas / gist:8631041
Created January 26, 2014 10:42
check ip lan
for ip in $(seq 1 254); do ping -c 1 192.168.0.$ip>/dev/null; [ $? -eq 0 ] && echo "192.168.0.$ip UP" || : ; done
@gwijayas
gwijayas / gist:8744115
Created January 31, 2014 21:58
ct spywaredomains.zones
grep -Eo "zone \"([a-z0-9.\-]+)" spywaredomains.zones | cut -d\" -f2
@gwijayas
gwijayas / gist:9927465
Created April 2, 2014 03:25
update git submodule
git submodule foreach git pull origin master
@gwijayas
gwijayas / gist:3689ae2501828dd0ae3b
Last active August 29, 2015 14:04
build perl static
CFLAGS='-O3 -march=native -mtune=native' ./Configure -des -Uuseshrplib -Dusethreads -Duselargefiles -Dprefix=/home/wijaya/opt/perl -Duse64bitint -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -Ui_libutil -A ccflags=-fPIC
perl Makefile.PL --with-apache2-apxs=/home/wijaya/opt/apache/bin/apxs --prefix=/home/wijaya/opt/apache
perl Makefile.PL MP_TRACE=0 MP_USE_DSO=1 MP_USE_STATIC=0 MP_APR_CONFIG=/home/wijaya/opt/apache/bin/apr-1-config MP_APXS=/home/wijaya/opt/apache/bin/apxs
@gwijayas
gwijayas / gist:2f2efa78ff665a6638b9
Created March 21, 2015 09:05
ubuntu install python 2.7.9 with pyenv
CONFIGURE_OPTS="--enable-unicode=ucs4 --with-dbmliborder=bdb:gdbm --with-system-expat --with-system-ffi --with-fpectl --enable-ipv6" pyenv install 2.7.9
<?php
/**
* This script can be used for generating PHP model for PDT.
* It builds PHP functions according to the loaded extensions in running PHP,
* using complementary information gathered from PHP.net documentation
*
* @author Michael Spector <[email protected]>
*/
if (version_compare(phpversion(), "5.0.0") < 0) {