Skip to content

Instantly share code, notes, and snippets.

View chrowe's full-sized avatar

Chris Rowe chrowe

View GitHub Profile
@chrowe
chrowe / README.md
Created March 12, 2021 19:49 — forked from boeric/README.md
Mapbox GL Synced Dual Maps

Mapbox GL Synced Dual Maps

The visualization demonstrates how to syncronize the state of two side-by-side Mapbox GL based maps. As the user interacts with one of the two maps, the state of the map (center position, zoom level, pitch and bearing) is dynamically copied to the second map (and vice versa). The code also demonstrates how to prevent call stack overflow due to recursive event handler triggering when the map state is updated.

The dataset is based on driver license suspensions from California DMV and East Bay Community Law Center. See prior visualization here

See the script in action at bl.ocks.org/boeric here, and fullscreen here

@chrowe
chrowe / bash.log
Created October 29, 2018 17:26
fill_geocoder.sh output
ubuntu@carto:~$ sudo docker exec -ti cartodb bash -c /cartodb/script/fill_geocoder.sh
--2018-10-29 16:36:55-- https://s3.amazonaws.com/data.cartodb.net/geocoding/dumps/0.0.1/admin0_synonyms.sql
Resolving s3.amazonaws.com (s3.amazonaws.com)... 52.216.86.109
Connecting to s3.amazonaws.com (s3.amazonaws.com)|52.216.86.109|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 130898 (128K) [application/octet-stream]
Saving to: ‘db_dumps/admin0_synonyms.sql’
admin0_synonyms.sql 100%[=================================================================================================>] 127.83K --.-KB/s in 0.004s
@chrowe
chrowe / Home_Weather_Display.py
Created February 23, 2018 05:14
Stripped down version of example GrovePi script for when you don't have and LCD screen
# Home_Weather_Display.py
#
# This is an project for using the Grove RGB LCD Display and the Grove DHT Sensor from the GrovePi starter kit
#
# In this project, the Temperature and humidity from the DHT sensor is printed on the RGB-LCD Display
#
#
# Note the dht_sensor_type below may need to be changed depending on which DHT sensor you have:
# 0 - DHT11 - blue one - comes with the GrovePi+ Starter Kit
# 1 - DHT22 - white one, aka DHT Pro or AM2302
@chrowe
chrowe / cr1000.py
Last active October 19, 2017 04:10
Campbell output
# Run on Windows with C:\Python27\python.exe Desktop/cr1000.py
import requests
import time
from BeautifulSoup import BeautifulSoup
url = "http://192.168.0.102/?command=dataquery&uri=dl:SOIL_MET&format=html&mode=most-recent&p1"
def getdata():
logger_data = [] # creat a variable to store data
response = requests.get(url) # bring the above url in to play
@chrowe
chrowe / README.md
Last active May 18, 2017 18:35
Ubuntu setup on Dell Inspiron 15 7559

h2. Done

## AWS
cd /var/lib/cassandra/
tar -czvf /home/ubuntu/aws-data.tgz data
scp /home/ubuntu/aws-data.tgz sw:~/
## SW
cd /var/lib/cassandra/
rm -rf ./data
tar -zxvf /root/aws-data.tgz
@chrowe
chrowe / manual_steps.md
Last active February 12, 2017 04:13
Pi Ansible
@chrowe
chrowe / README.md
Last active February 13, 2017 01:18
Node-red
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chrowe
chrowe / README.md
Last active March 25, 2016 04:28
Scripts to set up a site on our dev server

Use the site.sh script to create create a directory, download a git repo, create a log directory, set up settings.local.php, create a database, chreate a vhost file, and import a db backup

The other scripts are called by site.sh

Usage: site.sh [subdomain] [git url] [New MySQL password for site] [Database backup path] [http/https]

Script asks for the MySQL Root password