This is not a blog, but my notes and tips for research. Feel free to take any information and leave any comments or questions.
Search This Blog
Saturday, April 13, 2013
Thursday, April 11, 2013
Wednesday, April 10, 2013
iptables setting
# Basic setup
iptables --flush
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -P INPUT DROP
# Allow SSH
iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
iptables -A OUTPUT -o eth0 -p tcp --sport 22 -j ACCEPT
# Allow local loopback
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
# Allow DNS
iptables -A OUTPUT -p udp -o eth0 --dport 53 -j ACCEPT
iptables -A INPUT -p udp -i eth0 --sport 53 -j ACCEPT
# Allow ping
iptables -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-reply -j ACCEPT
# Allow http
iptables -A INPUT -i eth0 -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o eth0 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
# Allow https
iptables -A INPUT -i eth0 -p tcp --sport 443 -m state --state ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o eth0 -p tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT
# Printer (ipp=631, cups=515)
iptables -A OUTPUT -p tcp -d 192.168.60.157 --dport 515 -j ACCEPT
iptables -A INPUT -p tcp -s 192.168.60.157 --sport 515 -j ACCEPT
Thursday, March 28, 2013
How to print a regular file to pdf from command line
http://askubuntu.com/questions/27097/how-to-print-a-regular-file-to-pdf-from-command-line
enscript my_text_file.txt -o - | ps2pdf - output.pdfenscript -B -PPDF test.txtunoconv -f pdf test.txtMonday, March 18, 2013
Monday, March 11, 2013
How to build Goto blas using Intel compilers
Download GotoBlas http://www.tacc.utexas.edu/tacc-projects/gotoblas2
make FC=ifort CC=icc BINARY=64 USE_THREAD=0
The last option is to build without thread. Output message:
GotoBLAS build complete.
OS ... Linux
Architecture ... x86_64
BINARY ... 64bit
C compiler ... INTEL (command line : icc)
Fortran compiler ... INTEL (command line : ifort)
Library Name ... libgoto2_prescott-r1.13.a (Single threaded)
how to disable touch pad
Login as root.
$ xinput list
You will see results similar to
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=15 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=11 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=12 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ USB 2.0 UVC VGA WebCam id=10 [slave keyboard (3)]
↳ Asus WMI hotkeys id=13 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
The touchpad id is 15. To disable it:
$ xinput set-prop 15 "Device Enabled" 0
to re-enable it
$ xinput set-prop 15 "Device Enabled" 1
Subscribe to:
Posts (Atom)
Labels
- Academic Notes (4)
- BLAS (1)
- CEE618 (2)
- CentOS (1)
- Computation (1)
- Conferences (1)
- Cross compiling (1)
- Graphics (1)
- Hawaii Tour (2)
- Intel compiler (1)
- Just (1)
- Laptop (1)
- LaTex (22)
- Life and Humanity (8)
- Linux and Computing (107)
- LSF (1)
- Lyx (3)
- Macintosh (5)
- MPI (1)
- News (11)
- OpenFoam (1)
- OpenMPI (1)
- PBS (2)
- Software (4)
- SSH (2)
- torque (1)
- Touchpad (1)
- VMD (1)
- yum (1)