Category Archives: Uncategorized
Building OpenCV 3.0.0 for iOS Applications
Getting an Xcode framework version of OpenCV built used to be a pretty hair-raising exercise in yak-shaving. It’s gotten a whole lot easier lately.
First, check out the OpenCV sources:
cd ~ git clone https://github.com/Itseez/opencv.git cd opencd/ git checkout 3.0.0
You’ll need to make a symbolic link to Xcode’s developer tools so everyone can find things:
cd / sudo ln -s /Applications/Xcode.app/Contents/Developer/ Developer cd ~/opencv
All you need to do is have python run the build. Works flawlessly.
python platforms/ios/build_framework.py ios
Walk away from the keyboard for half an hour, when you get back, you’ll have a nice opencv2.framework in ~/opencv/ios/…
Fixing an IPTables Startup Error on CentOS 6
If you’re running CentOS 6 on a virtual server, you may run into the following problem when you try to restart iptables:
# service iptables restart iptables: Setting chains to policy ACCEPT: security raw nat[FAILED]filter iptables: Flushing firewall rules: [ OK ] iptables: Unloading modules: [ OK ] iptables: Applying firewall rules: [ OK ]
It’s a fairly simple fix. First, open up /etc/init.d/iptables in your favorite text editor, and look for this section of code:
echo -n $"${IPTABLES}: Setting chains to policy $policy: " ret=0 for i in $tables; do echo -n "$i " case "$i" in raw) $IPTABLES -t raw -P PREROUTING $policy \ && $IPTABLES -t raw -P OUTPUT $policy \ || let ret+=1 ;;
After the “case” line, and before the “raw)” line — i.e. between lines 5 and 6, above — add the following:
security) $IPTABLES -t filter -P INPUT $policy \ && $IPTABLES -t filter -P OUTPUT $policy \ && $IPTABLES -t filter -P FORWARD $policy \ || let ret+=1 ;;
When you’re done, the whole section should look like this:
echo -n $"${IPTABLES}: Setting chains to policy $policy: " ret=0 for i in $tables; do echo -n "$i " case "$i" in security) $IPTABLES -t filter -P INPUT $policy \ && $IPTABLES -t filter -P OUTPUT $policy \ && $IPTABLES -t filter -P FORWARD $policy \ || let ret+=1 ;; raw) $IPTABLES -t raw -P PREROUTING $policy \ && $IPTABLES -t raw -P OUTPUT $policy \ || let ret+=1 ;;
Then, restart iptables, and things should be fine.
# service iptables restart iptables: Setting chains to policy ACCEPT: security raw nat[ OK ]filter iptables: Flushing firewall rules: [ OK ] iptables: Unloading modules: [ OK ] iptables: Applying firewall rules: [ OK ]
The #GamerGate Ethics Quiz
Linkfest for Thursday, July 10
Technology
- SolidRun has released the HummingBoard, a souped-up version of the Raspberry Pi, available at a couple of performance levels and in a couple of form-factors. Looks very interesting for the “Internet of Things” applications…
- Got a really old PC or laptop? Turn it into something useful with LXLE, a remastered version of Ubuntu LTS designed to give even severely underpowered machines (by today’s standards) a pretty kickass and highly functional desktop.
- The Obama Administration has killed the nomination of pharmaceutical executive Phil Johnson after an outcry from the tech sector and a public statement from Sen. Chuck Schumer (D-NY) that he wouldn’t support the nomination.
Design
- The Benefits of Sketching by Hand: This is something I’ve been working on for a while, and practice definitely pays off. Wish I’d started sooner.
- Getting Real Survey Answers Out of Smart, Busy People: How Quartz got almost a thousand high-level executive to provide meaningful survey data on advertising.
Culture
A Conversation with Alejandro Jodorowsky at SXSW 2014
Current Events
- The State Legislature of Vermont has become the first in the country to call for a Constitutional Convention to overturn the Citizens United decision and get money as a form of “speech” out of the political process.