This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class='my-legend'> | |
<div class='title'>Activity Type<br></div> | |
<div class='scale'> | |
<ul class='labels'> | |
<li><img src="https://s3.amazonaws.com/pdb.www/hiking-3.png" />Hiking</li> | |
<li><img src="https://s3.amazonaws.com/pdb.www/mountainbiking-3.png" />Biking</li> | |
</ul> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#activitiesgeojson { | |
[zoom >= 0][zoom <=10] { | |
[type = "bike"] {point-file: url(icons/mountainbiking-2.png); } | |
[type = "hike"] {point-file: url(icons/hiking-2.png); } | |
} | |
[zoom = 11] { | |
[type = "bike"] {point-file: url(icons/mountainbiking-1.png); } | |
[type = "hike"] {point-file: url(icons/hiking-1.png); } | |
} | |
[zoom > 11][zoom <=14] { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--#lowecase table and field names scripts: | |
--(generates the sql needed; best to do in psql command line) | |
SELECT 'ALTER TABLE ' || quote_ident(c.table_schema) || '.' | |
|| quote_ident(c.table_name) || ' RENAME "' || c.column_name || '" TO ' || quote_ident(lower(c.column_name)) || ';' As ddlsql | |
FROM information_schema.columns As c | |
WHERE c.table_schema NOT IN('information_schema', 'pg_catalog') | |
AND c.column_name <> lower(c.column_name) | |
ORDER BY c.table_schema, c.table_name, c.column_name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--connect to "specific_database" | |
psql -d specific_database; | |
--alter table, change name of table and move to different schema | |
alter table schema_name.table_name | |
rename to new_table_name | |
set schema name_of_new_schema; | |
--end a psq command | |
\q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -O buildingSchool.osm http://overpass.osm.rambler.ru/cgi/xapi?node[building=school][bbox=-120.722519,34.288326,-119.405861,35.133329][@meta] | |
wget -O buildingUniversity.osm http://overpass.osm.rambler.ru/cgi/xapi?node[building=university][bbox=-120.722519,34.288326,-119.405861,35.133329][@meta] | |
wget -O amenitySchool.osm http://overpass.osm.rambler.ru/cgi/xapi?node[amenity=school][bbox=-120.722519,34.288326,-119.405861,35.133329][@meta] | |
wget -O amenityUniversity.osm http://overpass.osm.rambler.ru/cgi/xapi?node[amenity=university][bbox=-120.722519,34.288326,-119.405861,35.133329][@meta] | |
wget -O UCSB_hydrants.osm http://overpass.osm.rambler.ru/cgi/xapi?node[emergency=fire_hydrant][bbox=-119.8908,34.3994,-119.8333,34.4283][@meta] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -O UCSB_hydrants.osm http://overpass.osm.rambler.ru/cgi/xapi?node[emergency=fire_hydrant][bbox=-119.8908,34.3994,-119.8333,34.4283][@meta] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#key = building | |
wget -O goleta_buildings.osm http://overpass.osm.rambler.ru/cgi/xapi?way[building=yes][bbox=-119.919272,34.401164,-119.802431,34.44535][@meta] | |
#grabs points | |
#amenity = school | |
wget -O SBco_schools.osm http://overpass.osm.rambler.ru/cgi/xapi?node[amenity=school][bbox=-120.701335,34.369261,-119.418620,35.176881][@meta] | |
#grabs lines and points | |
#building = school |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Santa Barbara County: [bbox=-120.701335,34.369261,-119.418620,35.176881] | |
UC Santa Barbara: [bbox=-119.8908,34.3994,-119.8333,34.4283] | |
Goleta: [bbox=-119.919272,34.401164,-119.802431,34.44535] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal enableDelayedExpansion | |
REM sets folder to CD (current directory) | |
SET folder=%CD% | |
REM if the renamed folder already exists, I'll assume I've already run this script and go to EOF (end of file) | |
IF EXIST "%folder%\renamed" GOTO :EOF | |
REM else move on to :FOLDERDOESNOTEXIST | |
GOTO :FOLDERDOESNOTEXIST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- users in California | |
-- with a reputation > 1 | |
-- that have accessed site in past year | |
SELECT | |
ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#], | |
Id AS [User Link], | |
Reputation, | |
Location, | |
LastAccessDate, |
OlderNewer