Instantly share code, notes, and snippets.

View get-ips-from-dns.py
#!/usr/bin/python2.7
# https://docs.python.org/2.7/library/socket.html#socket.getaddrinfo
import socket
[ addr[4][0] for addr in socket.getaddrinfo("google.com", 0) if addr[0] in (socket.AF_INET, socket.AF_INET6) ]
View install_opencv.sh
# run as root
yum update
yum install gcc gcc-c++ make cmake
reboot
# run also as root
mkdir -p src/opencv
cd src
curl -O http://jaist.dl.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2
tar jxf OpenCV-2.4.3.tar.bz2