Reference: http://ftp.gnu.org/pub/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html
Add directory to the runtime library search path, for shared object.
Example: Add runtime search path /tmp/igetui
gcc -Wl,-rpath,/tmp/igetui/ $(PLATFORM) $(DEBUG) -lpthread -ldl
OR add it to LD_LIBRARY_PATH
ex.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/igetui
OR add it /etc/ld.so.conf and run ldconfig
Friday, January 16, 2015
Wednesday, November 12, 2014
Install Parallels Tools on CentOS for share folders
Source: http://tp69.wordpress.com/2012/10/03/parallels-tools-centos-server/
Issue: CentOS doesn't automatically mount it by default.
Solution: Mount it manually. Make sure your network connection is good in advance.
mount -r -t iso9660 /dev/sr0 /mnt/
cd /mnt
./install
Once done, restart the CentOS and the share folders will be automatically mounted on /media/psf
Issue: CentOS doesn't automatically mount it by default.
Solution: Mount it manually. Make sure your network connection is good in advance.
mount -r -t iso9660 /dev/sr0 /mnt/
cd /mnt
./install
Once done, restart the CentOS and the share folders will be automatically mounted on /media/psf
Thursday, November 6, 2014
Saturday, October 25, 2014
nf_conntrack: table full, dropping packet.
Could be DoS/DDoS attack
echo 102400 > /proc/sys/net/netfilter/nf_conntrack_max
echo 120 > /proc/sys/net/netfilter/nf_conntrack_generic_timeout
echo 54000 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_established
echo 30 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_time_wait
sysctl -p
echo 102400 > /proc/sys/net/netfilter/nf_conntrack_max
echo 120 > /proc/sys/net/netfilter/nf_conntrack_generic_timeout
echo 54000 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_established
echo 30 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_time_wait
sysctl -p
Wednesday, September 10, 2014
Login to remote server with private key
1. Generate private/public keys
ssh-keygen -t rsa
2. Upload the public key (id_rsa.pub) to remote server
scp ~/.ssh/id_rsa.pub howard@remoteServer:~/.ssh/
or
cat ~/.ssh/id_rsa.pub | ssh howard@remoteServer "cat >> ~/.ssh/authorized_keys"
3. Login to remote server and append the key
ssh howard@remoteServer
mkdir .ssh
chmod 700 .ssh
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
rm -rf id_rsa.pub
4. It's done!
To convert RSA private key to pem file, run the command below:
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem
ssh-keygen -t rsa
2. Upload the public key (id_rsa.pub) to remote server
scp ~/.ssh/id_rsa.pub howard@remoteServer:~/.ssh/
or
cat ~/.ssh/id_rsa.pub | ssh howard@remoteServer "cat >> ~/.ssh/authorized_keys"
3. Login to remote server and append the key
ssh howard@remoteServer
mkdir .ssh
chmod 700 .ssh
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
rm -rf id_rsa.pub
4. It's done!
To convert RSA private key to pem file, run the command below:
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem
Thursday, July 31, 2014
NIC checksum offload enable/disable
To enable/disable NIC checksum offload:
[Windows]
. Go to Control panel -> Network and Internet -> Network and Sharing Center
. Click "Change adapter settings"
. Right click on the NIC and select "Properties"
. Click "Configure" -> Advanced tab
. You will find
. UDP Checksum Offload (IPv4)
. TCP Checksum Offload (IPv4)
. IPv4 Checksum Offload
. Enable/disable could be done there.
[Windows]
. Go to Control panel -> Network and Internet -> Network and Sharing Center
. Click "Change adapter settings"
. Right click on the NIC and select "Properties"
. Click "Configure" -> Advanced tab
. You will find
. UDP Checksum Offload (IPv4)
. TCP Checksum Offload (IPv4)
. IPv4 Checksum Offload
. Enable/disable could be done there.
Wednesday, July 30, 2014
Wireshark filter data in payload
. To filter packets with hex value "0xff 0x13" in payload
frame contains ff:13
frame contains ff:13
Subscribe to:
Posts (Atom)
Check clients which connect to Mac OS X Wi-Fi Internet Sharing
arp -i bridge100 -a bridge100 may be different on your Mac OSX
-
1. Create an account on TestFlight ( http://testflightapp.com ) and with "Developer" option checked. 2. Log in to the TestFlight ...
-
[轉載] [Javascript] Encrypt your private blog post from the article of Kaie's Blog 今日在PPT上的Blog版逛到版友weijr所提到的一篇好文章,可以用來針對Blog中某一段文字給予加密,變成...
-
For Mac OS: Use lipo. Ex. lipo -info staticLibrary.a For Linux OS: Use file Ex. file staticLibrary.c