Skip to content

Instantly share code, notes, and snippets.

😡
Busy
mind your own business

Chris Wedgwood cwedgwood

View GitHub Profile
@cwedgwood
cwedgwood / get-ips-from-dns.py
Created Nov 9, 2018
Using python to get a list of IPs from DNS
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) ]
@cwedgwood
cwedgwood / install_opencv.sh
Created Jan 15, 2016 — forked from soundkitchen/install_opencv.sh
Amazon Linux AMI に OpenCV インスコしてみた。
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
You can’t perform that action at this time.