Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@springmeyer
springmeyer / Dockerfile.mbgl
Created May 1, 2018 02:07
Dockerfile for running mapbox-gl-native node module
FROM ubuntu:xenial-20171006
# docker build -t mbgl -f Dockerfile.mbgl .
# docker run -it mbgl bash
# install && clean up
RUN apt-get update -qq && \
apt-get install -y curl && \
curl https://nodejs.org/dist/v4.8.7/node-v4.8.7-linux-x64.tar.gz | tar zxC /usr/local --strip-components=1
@springmeyer
springmeyer / install-pcp.sh
Last active August 22, 2018 15:09 — forked from johanstenberg92/install-pcp.sh
Install Performance Co-Pilot on Amazon Linux AMI
#!/bin/sh
set -eu
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you are not root."
exit 1
fi
if !(type pcp 2>/dev/null;) then
@springmeyer
springmeyer / run.sh
Last active November 23, 2016 00:21
build all of osrm and run all the tests
#!/bin/bash
set -eu
set -o pipefail
function echo_color { >&2 echo -e "\033[1m\033[36m* $1\033[0m"; }
function echo_color_substep { >&2 echo -e "\033[1m\033[32m* $1\033[0m"; }
export SHOW_COMPILE_FLAGS=false
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.
@springmeyer
springmeyer / osrm-backend-warnings.txt
Created October 25, 2016 01:39
-Wsign-compare -Wconversion warnings with clang 3.8
This file has been truncated, but you can view the full file.
CMake Warning at CMakeLists.txt:117 (message):
GNU gold linker isn't available.
In file included from /Users/dane/projects/osrm-backend/src/storage/storage.cpp:3:
/Users/dane/projects/osrm-backend/include/storage/io.hpp:69:12: warning: implicit conversion loses integer precision: 'streamoff' (aka 'long long') to 'std::uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
return length;
~~~~~~ ^~~~~~
/Users/dane/projects/osrm-backend/include/storage/io.hpp:77:61: warning: implicit conversion changes signedness: 'unsigned long' to 'streamsize' (aka 'long') [-Wsign-conversion]
timestamp_input_stream.read(timestamp, timestamp_length * sizeof(char));
@springmeyer
springmeyer / install.sh
Last active September 29, 2017 09:24
Install osmium-tool with mason
mkdir ./mason
curl -sSfL https://github.com/mapbox/mason/archive/v0.15.0.tar.gz | tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=./mason
OSMIUM_VERSION="1.7.1"
./mason/mason install osmium-tool ${OSMIUM_VERSION}
export PATH=$(./mason/mason prefix osmium-tool ${OSMIUM_VERSION})/bin:${PATH}
export MANPATH=$(./mason/mason prefix osmium-tool ${OSMIUM_VERSION})/share/man:${MANPATH}
osmium help extract
osmium
diff --git a/test/catch.hpp b/test/catch.hpp
index 391c7ab..7f96d25 100644
--- a/test/catch.hpp
+++ b/test/catch.hpp
@@ -5140,8 +5140,6 @@ namespace Catch {
} // namespace Catch
-#if defined ( CATCH_PLATFORM_WINDOWS ) /////////////////////////////////////////
-
diff --git a/include/util/json_util.hpp b/include/util/json_util.hpp
index 00f4501..32a1bd7 100644
--- a/include/util/json_util.hpp
+++ b/include/util/json_util.hpp
@@ -36,28 +36,6 @@ template <typename... Args> Array make_array(Args... args)
return a;
}
-template <typename T> Array make_array(const std::vector<T> &vector)
-{
@springmeyer
springmeyer / git-squash.sh
Created December 22, 2015 17:52
Poor person's git squash
# start in a custom branch
git checkout <custom branch>
# make sure you have latest master pulled in
git pull origin master
# then diff out the difference between your branch and master
git diff origin/master > my.diff
# then delete your local branch