This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python3-config --configdir | |
./configure --with-features=huge --enable-multibyte --enable-python3interp --with-python3-config-dir=/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu --enable-rubyinterp --enable-perlinterp --enable-luainterp --enable-cscope --enable-gui=gtk2 --prefix=/usr | |
make -j4 VIMRUNTIMEDIR=/usr/share/vim/vim74 | |
make clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postflight error because StartupItemContext doesn't exist in /usr/libexec . | |
Refer to http://www.symantec.com/connect/articles/altiris-agent-mac-support-mac-os-x-10-yosemite | |
create /usr/libexec/StartupItemContext | |
************************************* | |
#!/bin/sh | |
unset LAUNCHD_SOCKET | |
exec launchctl bsexec / "$@" | |
************************************* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D:\cygwin64\bin\mintty.exe D:\cygwin64\bin\rlwrap %COMSPEC% | |
# assuming cygwin64 is installed in D driver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# make CentOS 6.6 to run headless browser selenium | |
# Install Python Anaconda 3.4 | |
# http://continuum.io/downloads | |
yum groupinstall "Development tools" | |
# https://gist.github.com/textarcana/5855427 | |
# Follow these steps to set up a CentOS 6.3 host to run headless Selenium tests with Firefox. | |
sudo yum -y install firefox Xvfb libXfont Xorg | |
sudo yum -y groupinstall "X Window System" "Desktop" "Fonts" "General Purpose Desktop" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def safeprint(text): | |
import os,sys | |
os.write(sys.stdout.fileno(), text.encode(encoding='utf-8')) | |
sys.stdout.flush() | |
tt = "思飞通达家电销售管理软件" | |
safeprint(tt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \ | |
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \ | |
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev ruby-dev mercurial | |
apt-get install python3.4-dev | |
apt-get install python3-all-dev | |
apt-get install python-all-dev | |
hg clone https://code.google.com/p/vim/ | |
cd vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<int N, int i> | |
struct SqrtM{ | |
enum{ | |
ret = (i*i <= N && (i + 1)*(i + 1) > N)? i : SqrtM<N, i - 1>::ret | |
}; | |
}; | |
template<int N> | |
struct SqrtM<N,0>{ |
NewerOlder