Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Rowe chrowe

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

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 Oct 29, 2018
fill_geocoder.sh output
View bash.log
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 Feb 23, 2018
Stripped down version of example GrovePi script for when you don't have and LCD screen
View Home_Weather_Display.py
# 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 Oct 19, 2017
Campbell output
View cr1000.py
# 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
Ubuntu setup on Dell Inspiron 15 7559
View README.md

h2. Done

View cassandra backup migrate
## 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
View README.md
View pipe-graph.ipynb
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 Mar 25, 2016
Scripts to set up a site on our dev server
View README.md

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