Skip to content

Instantly share code, notes, and snippets.

View doneill's full-sized avatar
🏔️

Dan O'Neill doneill

🏔️
View GitHub Profile
@doneill
doneill / info.json
Created June 28, 2023 21:21
TileJSON.io - Tile Json Test
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},
@doneill
doneill / MainActivity.java
Last active May 24, 2022 00:18
React Native Android Lifecycle events
// set up lifecycle events in Android Main Activity
private static final String TAG = "MainActivity";
@Override
public void onPause() {
super.onPause();
ReactContext reactContext = getReactInstanceManager().getCurrentReactContext();
WritableMap params = Arguments.createMap();
params.putString("event", "onPause");
@doneill
doneill / .travis.yml
Created April 14, 2020 00:56
Build Android debug app on Travis CI
language: android
sudo: required
jdk: oraclejdk8
branches:
only:
- master # build master branch only
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
@doneill
doneill / covid19.py
Last active March 30, 2020 22:46
Update States geojson file with covid data from worldometer site
import json
import requests
import lxml.html as lh
import pandas as pd
from htmlmin import minify
# ///////////////////////////////////////////////////
# scrape url table and convert to panda datatable
# ///////////////////////////////////////////////////
@doneill
doneill / qgis-xyz.xml
Created June 27, 2019 20:43
QGis XYZ Connections
<!DOCTYPE connections>
<qgsXYZTilesConnections version="1.0">
<xyztiles name="CARTO Dark" referer="" authcfg="" zmin="0" password="" url="https://a.basemaps.cartocdn.com/rastertiles/dark_all/{z}/{x}/{y}@2x.png" zmax="18" username=""/>
<xyztiles name="CARTO Light" referer="" authcfg="" zmin="0" password="" url="https://a.basemaps.cartocdn.com/rastertiles/light_all/{z}/{x}/{y}@2x.png" zmax="18" username=""/>
<xyztiles name="CARTO Light No Labels" referer="" authcfg="" zmin="0" password="" url="https://a.basemaps.cartocdn.com/rastertiles/light_nolabels/{z}/{x}/{y}@2x.png" zmax="18" username=""/>
<xyztiles name="CARTO Voyager" referer="" authcfg="" zmin="0" password="" url="https://a.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}@2x.png" zmax="18" username=""/>
<xyztiles name="Carto Position" referer="" authcfg="" zmin="0" password="" url="https://cartodb-basemaps-a.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png" zmax="18" username=""/>
<xyztiles name="ESRI Imagery" referer="" auth
@doneill
doneill / current-temp.js
Last active June 13, 2019 00:38
Fulcrum data event to get current temp from openweathermap
var ow_appid = [APPID];
var ow_base_url = 'https://api.openweathermap.org';
var ow_api = '/data/2.5';
// changed event
ON('click', 'get_current_temp', getWeather);
// get open weather summary
function getWeather() {
@doneill
doneill / abl.geojson
Last active March 6, 2020 04:22
Alaska Baseball League Ballparks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@doneill
doneill / colorcodes
Last active October 5, 2018 22:26
Transparency Color Codes
(AA in #AARRGGBB)
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
@doneill
doneill / node-switch.sh
Last active June 11, 2018 16:45
Switch versions of node
$ node --version
$ brew search node
$ brew unlink node
$ brew install node@8
$ brew link node@8
@doneill
doneill / setjdk.sh
Last active May 30, 2018 21:12
Switch Java SDK's
function setjdk() {
if [ $# -ne 0 ]; then
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
if [ -n "${JAVA_HOME+x}" ]; then
removeFromPath $JAVA_HOME
fi
export JAVA_HOME=`/usr/libexec/java_home -v $@`
export PATH=$JAVA_HOME/bin:$PATH
fi
}