Skip to content

Instantly share code, notes, and snippets.

@sansumbrella
sansumbrella / MapboxMap.css
Last active September 27, 2019 18:27
Copy of the Mapbox data-driven-lines sample using React+Hooks
.mapbox-map {
min-height: 100%;
width: 100%;
position: fixed;
top: 0;
left: 0;
}
@sansumbrella
sansumbrella / index.html
Last active June 21, 2019 21:29
Pickable 3D buildings with feature state and buildings plus
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Highlight 3D Building By ID</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.0/mapbox-gl.js"></script>
<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.0/mapbox-gl.css" rel="stylesheet" />
<style>
body {
Try try try
@sansumbrella
sansumbrella / refugee_quick_script.md
Created January 30, 2017 16:37
Quick script for opposing the executive order on refugees

I am calling in opposition to the executive order on refugees. It is harmful to victims of terrorism, keeping them in danger longer. It is harmful to our economy, preventing many people from traveling for work or returning to work in the US. And the unwelcoming message it sends is clear, making the United States appear like an international bully unworthy of respect, and thereby increasing hostile attitudes toward our country.

@sansumbrella
sansumbrella / LICENSE
Last active June 11, 2020 07:45
Reaction Diffusion Simulation in GLSL
/*
* Copyright (c) 2016 David Wicks, sansumbrella.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@sansumbrella
sansumbrella / TinyScene.cpp
Last active July 14, 2016 22:57
Tiny Cinder C++ Scene Graph
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "cinder/Utilities.h"
#include "cinder/Log.h"
#include "cinder/Json.h"
using namespace ci;
using namespace ci::app;
using namespace std;
@sansumbrella
sansumbrella / user-config.jam
Last active June 2, 2016 19:55
Expansion of Cinder's user-config for building libraries for tvos.
using clang : osx
: xcrun clang -arch i386 -arch x86_64 -stdlib=libc++ -std=c++11 -mmacosx-version-min=10.8 -fvisibility-inlines-hidden
;
using clang : ios
: xcrun clang -arch armv7 -arch arm64 -stdlib=libc++ -std=c++11 -miphoneos-version-min=6.0 -fvisibility-inlines-hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/
;
using clang : ios_sim
: xcrun clang -arch i386 -arch x86_64 -stdlib=libc++ -std=c++11 -miphoneos-version-min=6.0 -fvisibility-inlines-hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/
@sansumbrella
sansumbrella / build_for_tvos.sh
Last active March 16, 2021 14:50
Build OpenCV3 for tvos
#!/bin/bash
# Place this file adjacent to opencv and you should be able to build for tvos.
# The OpenCV CMakeLists.txt file is pretty huge, but it is well organized,
# so if you need to make changes, consult what options there are in that file.
# A whole bunch of compiler tests fail, but that doesn't seem to matter.
#
# After this runs CMake, you will want to build the binaries and install the headers.
# $ make -j 8
# $ make install
#
@sansumbrella
sansumbrella / UnixSignalHandlers.h
Last active December 7, 2015 22:33
SIGPIPE and SIGTERM handlers
/*
* Copyright (c) 2015 David Wicks, sansumbrella.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@sansumbrella
sansumbrella / image_load_timing.cpp
Last active August 29, 2015 14:18
Test of async and synchronous image load timing in Cinder.
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "cinder/gl/Texture.h"
using namespace ci;
using namespace ci::app;
using namespace std;
struct TextureInfo {