Sunday, May 27, 2012
Install gnuplot 4.6 with pdf on Ubuntu
http://blog.pengyifan.com/install-gnuplot-4-6-with-pdf-on-ubuntu/
Saturday, May 19, 2012
Compile fnTBL
http://www.cs.jhu.edu/~rflorian/fntbl/
1. check cpu type
less /proc/cupinfo
2. change makefile $FNTBL/src/Makefile
delete "-march=pentium4" or change it to "-march=XXX"
3. change source file $FNTBL/src/fnTBL_train.cc, line 883
change "static_cast<unsigned int>" to "static_cast<unsigned long int>"
4. compile
> make all
Wednesday, May 2, 2012
函数式编程的另类指南(1)
http://blog.pengyifan.com/%e5%87%bd%e6%95%b0%e5%bc%8f%e7%bc%96%e7%a8%8b%e7%9a%84%e5%8f%a6%e7%b1%bb%e6%8c%87%e5%8d%971/
Wednesday, April 4, 2012
Proxy Firefox through a SSH tunnel
Have you ever wanted to visit sites during the day from a location that denied access to those sites? What you need is the ability to create a secure and encrypted ssh connection to tunnel your browser traffic through. If you have access to a remote machine by way of ssh, you can set up Firefox to visit these sites.
The following method is only tested on Windows XP, with cygwin installed.
The following method is only tested on Windows XP, with cygwin installed.
LOCAL_PORT: localhost port for ssh tunnel
SERVER_NAME: remote machine
1. set up firefox proxy
- preferences --> advanced --> network --> settings
- choose SOCKS v5
- manual proxy configurations:
- SOCKS
- Host: 127.0.0.1:LOCAL_PORT
- No Proxy for: localhost, 127.0.0.1
- leave the rest of entries BLANK
2. set up firefox DNS
- open "about:config" page in Firefox
- search "network.proxy.socks_remote_dns", set the value to "true"
3. establish ssh tunnel
ssh -C2qTnN -D LOCAL_PORT username@SERVER_NAME
Sunday, March 11, 2012
Share folders via Samba without a password
http://blog.pengyifan.com/share-folders-via-samba-without-a-password/
Saturday, March 10, 2012
verb list whose VBN and VBD are same
matched
developed
compared
reduced
created
correlated
detected
demonstrated
genotyped
indicated
observed
fed
disrupted
repressed
transduced
designed
examined
investigated
prevented
suggested
produced
revealed
identified
affected
consisted
presented
assessed
abolished
tested
injected
resulted
determined
resected
confirmed
reported
measured
performed
varied
supported
aimed
collected
evaluated
allowed
inhibited
used
caused
analyzed
amplified
decreased
expressed
studied
transfected
included
increased
contained
encoded
induced
applied
found
Wednesday, March 7, 2012
Find top 100 files and move them
- ls -1 -tr | grep "pattern" | head -100 | xargs -I FILE mv FILE dst_dir
- find "pattern" | head -100 | xargs -I FILE mv FILE dst_dir
Subscribe to:
Posts (Atom)