Skip to content

Instantly share code, notes, and snippets.

View springmeyer's full-sized avatar

Dane Springmeyer springmeyer

View GitHub Profile
@springmeyer
springmeyer / gist:58e9fc6aee929d796ab3
Created October 7, 2014 19:47
node v0.10.32 + clang-3.5 + -faddress=sanitize
==20156==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x614000009640
#0 0x5b1f0b in operator delete(void*) (/usr/local/bin/node+0x5b1f0b)
#1 0x1039e8b in node::After(uv_fs_s*) (/usr/local/bin/node+0x1039e8b)
#2 0x10be1ec in uv__work_done /home/ubuntu/node/out/../deps/uv/src/unix/threadpool.c:220:5
#3 0x10b40c3 in uv__async_event /home/ubuntu/node/out/../deps/uv/src/unix/async.c:80:5
#4 0x10b42cb in uv__async_io /home/ubuntu/node/out/../deps/uv/src/unix/async.c:156:3
#5 0x10c0b03 in uv__io_poll /home/ubuntu/node/out/../deps/uv/src/unix/linux-core.c:271:9
#6 0x10b4767 in uv_run /home/ubuntu/node/out/../deps/uv/src/unix/core.c:317:5
#7 0x101df5d in node::Start(int, char**) (/usr/local/bin/node+0x101df5d)
#8 0x2b007f1a876c in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2176c)
index 0a0eac1..cfc2908 100644
--- a/index.js
+++ b/index.js
@@ -72,15 +72,21 @@ module.exports = function (inStream) {
var after = '\n]}\n'
var started = false
outStream.push(before)
+ var from = gdal.SpatialReference.fromEPSG(3857);
+ var to = gdal.SpatialReference.fromEPSG(4326);
+
@springmeyer
springmeyer / memusg
Created September 30, 2014 17:23
track peak memory usage of program
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
#
# Author: Jaeho Shin <[email protected]>
# Created: 2010-08-16
set -um
# check input
[ $# -gt 0 ] || { sed -n '2,/^#$/ s/^# //p' <"$0"; exit 1; }
This file has been truncated, but you can view the full file.
@springmeyer
springmeyer / mapnik-overzoom-debug.diff
Created September 3, 2014 20:24
mapnik-overzoom-debug.diff
diff --git a/include/mapnik/renderer_common/process_raster_symbolizer.hpp b/include/mapnik/renderer_common/process_raster_symbolizer.hpp
index 08d9000..503be8b 100644
--- a/include/mapnik/renderer_common/process_raster_symbolizer.hpp
+++ b/include/mapnik/renderer_common/process_raster_symbolizer.hpp
@@ -24,6 +24,7 @@
#define MAPNIK_RENDERER_COMMON_PROCESS_RASTER_SYMBOLIZER_HPP
// mapnik
+#include <mapnik/debug.hpp>
#include <mapnik/warp.hpp>
diff --git a/include/mapnik/util/variant.hpp b/include/mapnik/util/variant.hpp
index d6f8002..e74170b 100644
--- a/include/mapnik/util/variant.hpp
+++ b/include/mapnik/util/variant.hpp
@@ -553,13 +553,12 @@ public:
template <typename T, class = typename std::enable_if<
detail::is_valid_type<T, Types...>::value>::type>
VARIANT_INLINE variant(T && val) noexcept
- : type_index(detail::value_traits<T, Types...>::index)
+ : type_index(detail::value_traits<std::remove_reference<T>::type, Types..
@springmeyer
springmeyer / feat.cpp
Created September 3, 2014 16:50
win debug variant
#include <iostream>
#include <mapnik/util/variant.hpp>
#include <mapnik/value.hpp>
#include <mapnik/unicode.hpp>
#include <ostream>
//#include <mapnik/feature.hpp>
//#include <mapnik/feature_factory.hpp>
int main() {
mapnik::value val = 0.0;
@springmeyer
springmeyer / icu-uint16_t.diff
Created August 30, 2014 00:09
Patch ICU on windows to use uint16_t for UChar typedef
diff --git a/source/common/unicode/umachine.h b/source/common/unicode/umachine.h
index d1102f4..67e2a41 100644
--- a/source/common/unicode/umachine.h
+++ b/source/common/unicode/umachine.h
@@ -266,17 +266,7 @@ typedef int8_t UBool;
*
* @stable ICU 4.4
*/
-#if defined(UCHAR_TYPE)
- typedef UCHAR_TYPE UChar;
@springmeyer
springmeyer / icu.diff
Created August 29, 2014 22:16
ICU 53.1 patches for building with Visual Studio 2014 CTP #3
diff --git a/source/common/unicode/umachine.h b/source/common/unicode/umachine.h
index d1102f4..17e696e 100644
--- a/source/common/unicode/umachine.h
+++ b/source/common/unicode/umachine.h
@@ -120,6 +120,21 @@
/* limits for int32_t etc., like in POSIX inttypes.h */
/*==========================================================================*/
+#if defined(_MSC_VER) && _MSC_VER >= 1900
+#undef INT8_MAX
@springmeyer
springmeyer / gist:d84023e69e2e2af921e2
Created July 29, 2014 19:58
diff -d -r -u node-v0.11.13 node-v0.11.13_atom
Only in node-v0.11.13: .gitattributes
Only in node-v0.11.13: .gitignore
Only in node-v0.11.13: .mailmap
Only in node-v0.11.13: AUTHORS
Only in node-v0.11.13: BSDmakefile
Only in node-v0.11.13: CONTRIBUTING.md
Only in node-v0.11.13: ChangeLog
Only in node-v0.11.13: LICENSE
Only in node-v0.11.13: Makefile
Only in node-v0.11.13: README.md