Skip to content

Instantly share code, notes, and snippets.

@bmount
bmount / ccv-mavericks-makefile.diff
Created January 16, 2014 10:01
Build ccv on osx 10.9
--- a/lib/makefile
+++ b/lib/makefile
@@ -1,7 +1,7 @@
include config.mk
#CC += -faddress-sanitizer -fno-omit-frame-pointer
-CFLAGS := -O3 -ffast-math -Wall $(CFLAGS)# -fprofile-arcs -ftest-coverage
+CFLAGS := -O3 -ffast-math -Wall $(CFLAGS)# -fprofile-arcs -ftest-coverage -I/usr/local/include -L/usr/local/lib
.PHONY: all clean
@bmount
bmount / setup-wifi.sh
Created November 7, 2013 08:22
linux wireless wpa quick manual configure
#!/bin/bash
if [ $# -lt 3 ]
then
echo "usage: ./setup-wifi.sh INTERFACE ACCESS_POINT_SSID PASSPHRASE"
echo "example: ./setup-wifi.sh wlan0 linksys supersecret"
exit;
fi
wpa_passphrase $2 $3 > wifi.conf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bmount
bmount / san_francisco_simplified.geojson
Created October 17, 2013 06:53
very but not overly simple San Francisco mainland polygon (.005)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bmount
bmount / sf_pretty_simple.geojson
Created October 17, 2013 06:48
pretty simplified san francisco
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bmount
bmount / sf_very_simple.geojson
Created October 17, 2013 06:46
simplified san franciscos
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bmount
bmount / Python-2.7.3-xcompile.patch
Created October 11, 2013 03:59
Cross compile python 2.7.3 for arm
diff -ur Python-2.7.3.orig/configure Python-2.7.3-Source/configure
--- Python-2.7.3.orig/configure 2012-04-09 19:07:36.000000000 -0400
+++ Python-2.7.3-Source/configure 2012-10-23 14:10:45.305220393 -0400
@@ -13697,7 +13697,7 @@
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- ac_cv_have_long_long_format=no
+ ac_cv_have_long_long_format="cross -- assuming yes"
else
@bmount
bmount / cmake_flags_opencv_mac
Created October 1, 2013 02:15
cmake flags for opencv on mac w/ tbb, non-system python, and examples.
cmake -DPYTHON_EXECUTABLE:PATH='/usr/local/bin/python' -DPYTHON_INCLUDE_DIR:PATH='/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7/' -DPYTHON_LIBRARY:PATH='/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib' -DBUILD_EXAMPLES:BOOL="1" -DWITH_TBB:BOOL="1" -G "Unix Makefiles" ..
function urlTmpl (tmpl, obj) {
return tmpl.replace(/{{([a-zA-Z0-9]+)}}/g, function (s, v) { return obj[v] })
}
/*
> urlTmpl('shit is {{status}} and {{qualifier}}', { status: 'fucked up', qualifier: 'bullshit' })
"shit is fucked up and bullshit"
> urlTmpl('shit is {{status}} and {{qualifier}}', { status: 'fucked up', oops_qualifier: 'bullshit' })
"shit is fucked up and undefined"