Skip to content

Instantly share code, notes, and snippets.

@mapsam
mapsam / code.js
Created January 14, 2016 04:51
Gmail Label Runner
// append old log to the new log
Logger.log(Logger.getLog());
function processInbox() {
var threads = GmailApp.getInboxThreads(0, 25);
for (var i = 0; i < threads.length; i++) {
var thread = threads[i];
var messages = thread.getMessages();
// GITHUB
@mapsam
mapsam / pppushitrealgood.md
Last active January 2, 2016 18:21
Push to Maptime Seattle resources

Assumes you have git@github.com:MaptimeSEA/maptimesea.github.io.git cloned on your local machine.

  1. pull down all recent changes from master: git pull origin master
  2. checkout a new branch, git checkout -b BRANCH-NAME
  3. add a new file under _posts/ with the proper date formatted file name YYYY-MM-DD-NAME.markdown
  4. add the proper YAML to the top of the new file (copy paste from another file)
  5. add all the stuff, make changes, do your thing
  6. add file to local git: git add FILE-NAME.markdown
  7. commit file with note: git commit -m 'NOTE ABOUT CHANGES
  8. push changes to new remote branch: git push origin HEAD (actually write the word HEAD in all caps)
@mapsam
mapsam / README.md
Last active December 18, 2015 01:39
Winding order

This example shows how geometries with inner loops and outer loops build themselves in opposite direction using d3 and a stroke-dashoffset in a .transition() infinite loop. The outer loop (red) builds clockwise, while the inner loop (blue) builds counter-clockwise. This is important in order to confidently account for "holes" in polygons. Here's a good summary of the importance in winding order.

@mapsam
mapsam / README.md
Created December 14, 2015 19:30
Outer & Inner loop drawings, TopoJSON

This example shows how geometries with inner loops and outer loops build themselves in opposite direction. The outer loop (red) builds clockwise, while the inner loop (blue) builds counter-clockwise. This is important in order to confidently account for negative MultiPolygons instead of separate Polygon features. Here's a good summary of the importance in winding order.

@mapsam
mapsam / california.json
Last active December 14, 2015 18:03
Draw TopoJSON
{"type":"Polygon","coordinates":[[[-120,40.9],[-120,40.72],[-120,40.53],[-120,40.35],[-120,40.17],[-120,39.98],[-120,39.8],[-120,39.62],[-120,39.44],[-120,39.25],[-120,39.07],[-120,39.01],[-120,39],[-119.77,38.84],[-119.53,38.67],[-119.3,38.51],[-119.06,38.35],[-118.83,38.18],[-118.59,38.02],[-118.36,37.85],[-118.13,37.69],[-117.94,37.55],[-117.76,37.42],[-117.58,37.28],[-117.39,37.14],[-117.21,37],[-117.03,36.86],[-116.84,36.73],[-116.66,36.59],[-116.5,36.46],[-116.34,36.34],[-116.18,36.21],[-116.02,36.08],[-115.86,35.96],[-115.7,35.83],[-115.53,35.71],[-115.37,35.58],[-115.19,35.44],[-115,35.29],[-114.81,35.15],[-114.63,35],[-114.63,35],[-114.63,35],[-114.62,34.88],[-114.61,34.87],[-114.59,34.86],[-114.58,34.86],[-114.57,34.84],[-114.56,34.83],[-114.56,34.82],[-114.56,34.79],[-114.54,34.77],[-114.52,34.76],[-114.49,34.75],[-114.43,34.64],[-114.42,34.64],[-114.42,34.63],[-114.42,34.63],[-114.42,34.6],[-114.42,34.6],[-114.41,34.58],[-114.39,34.57],[-114.38,34.56],[-114.38,34.54],[-114.38,34.54],[-114.37,34.5
@mapsam
mapsam / react.md
Last active December 11, 2015 21:09
Learning React

Starting with the tutorial straight from Facebook: https://facebook.github.io/react/docs/tutorial.html

  • successfully installed with git clone https://github.com/reactjs/react-tutorial.git
  • required npm install
  • successfully started server running node server.js - viewing at localhost:3000
  • my first Ah-ha is that React can essentially be used to consume a custom API and render components via React components. They are not DOM nodes, apparently - React components are their own thing.
  • react-dom (ReactDOM) gives you DOM-specific methods, while react (react native) gives you React methods.
  • nesting components is super awesome, and now starting to click how to pass data down the pipe with this.props
  • linking a JSON data source to the components now. Apparently props are immutable, meaning that if we change one it won't change down the pipe. This means we use this.state, which can be updated by running this.setState() and passing in parameters based off the component's needs.
  • cool
@mapsam
mapsam / notes.md
Last active December 10, 2015 20:33
  • Maptime Socials
    • could be every other month or quarter? What about not affiliated to the meeting times
    • not on Wednesdays so we can get more people
    • Christy is willing to take this on
  • Andrew is feeling burnt out, and that's healthy - now that there are three of us
    • who does what and when?

Monthly duties for organizers

  • primary leader per month
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mapsam
mapsam / addresses.csv
Last active September 29, 2015 23:49
Basics of Web Mapping
Tenderloin Art Gallery or Organization Street Address City Zip Code Telephone No. art/cultural workers
Alonzo King LINES Ballet 25 Taylor Street San Francisco 94103 415.863.3040 56
American Conservatory Theater 405 Geary Street San Francisco 94102 415.749.2228 73
Bash Contemporary Art Gallery 210 Golden Gate Avenue San Francisco 94102 415.926.8573 2
Book & Job Gallery 838 Geary Street San Francisco 94109 415.857.4330 4
Center for New Music 55 Taylor Street San Francisco 94102 415.275.2466 5
The Costume Shop 1117 Market Street San Francisco 94102 6
CounterPulse 80 Turk Street San Francisco 94102 415.626.2060 9
The Cutting Ball Theater 277 Taylor Street San Francisco 94102 415.292.4700 43
Down Town Comedy Theater 287 Ellis Street San Francisco 94102 415.378.4413 1