This file contains hidden or 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
| rbenv local 2.4.1 | |
| gem install jekyll | |
| jekyll new hello | |
| jekyll new-theme hello-theme | |
| vim copy-theme.rb | |
| ``` | |
| require 'fileutils' |
This file contains hidden or 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
| sudo yum groupinstall "Development Tools" -y | |
| ### | |
| # Node | |
| ### | |
| curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash | |
| . ~/.nvm/nvm.sh | |
| nvm install 9.2.0 | |
| node -v |
This file contains hidden or 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
| # get Let's Encrypt client | |
| wget https://dl.eff.org/certbot-auto | |
| chmod a+x certbot-auto | |
| # pass domain to -d; must be a bound domain, not a raw IP | |
| sudo ./certbot-auto --debug -v --server https://acme-v01.api.letsencrypt.org/directory certonly -d MYDOMAIN.PARTY | |
| # on ec2, use the second option (temporary webserver) when prompted for a method | |
| # within the app, replace all requests for http endpoints/assets with requests to https |
This file contains hidden or 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
| from __future__ import division | |
| from sklearn.cluster import KMeans | |
| from numbers import Number | |
| from pandas import DataFrame | |
| import skfuzzy as fuzz | |
| import sys, codecs, numpy | |
| class autovivify_list(dict): | |
| '''Pickleable class to replicate the functionality of collections.defaultdict''' | |
| def __missing__(self, key): |
This file contains hidden or 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
| var express = require('express') | |
| var bodyParser = require('body-parser') | |
| var path = require('path') | |
| // payments | |
| var keyPublishable = 'PUT YOUR TEST PUBLISHABLE KEY HERE (THIS STARTS WITH pk_)' | |
| var keySecret = 'PUT YOUR TEST SECRET KEY HERE (THIS STARTS WITH sk_)' | |
| var stripe = require('stripe')(keySecret) | |
| // server |
This file contains hidden or 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
| <!-- from: http://duspviz.mit.edu/web-map-workshop/databases-leaflet-cartodb/ --> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Cambridge Coffee Shops</title> | |
| <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
| <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
| <link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" /> | |
| <link rel="stylesheet" type="text/css" href="css/style.css"> | |
| </head> |
This file contains hidden or 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
| document.querySelectorAll('.node').forEach(function(d){ | |
| console.log(d.id, d.getAttribute('cx'), d.getAttribute('cy')) | |
| }) |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>San Juan Island Geology - Interactivity</title> | |
| <meta charset="utf-8"> | |
| <link rel="stylesheet" href="https://mapzen.com/js/mapzen.css"> | |
| <script src="https://mapzen.com/js/mapzen.min.js"></script> | |
| <style> | |
| #map { | |
| height: 100%; |
This file contains hidden or 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
| <!doctype html> | |
| <html lang='en-us'> | |
| <head> | |
| <meta charset='utf-8'> | |
| <meta http-equiv='Content-Type' content='text/html; charset=utf-8'> | |
| <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'> | |
| <title>Mapping Early English Books</title> | |
| <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.1/leaflet.css' /> | |
| <script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.1/leaflet.js'></script> | |
| <script type='text/javascript' src='https://cdn.rawgit.com/mlevans/leaflet-hash/master/leaflet-hash.js'></script> |
This file contains hidden or 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
| {"Aberdare": "Mid Glamorgan", "Aberdeen": "Aberdeenshire", "Aberdovey": "Gwynedd", "Abergavenny": "Gwent", "Abergele": "Clwyd", "Abertillery": "Gwent", "Aberystwyth": "Dyfed", "Abingdon": "Oxfordshire", "Accrington": "Lancashire", "Airdrie": "Lanarkshire", "Alcester": "Warwickshire", "Aldeburgh": "Suffolk", "Alderley Edge": "Cheshire", "Aldershot": "Hampshire", "Alfreton": "Derbyshire", "Alness": "Ross-shire", "Alnwick": "Northumberland", "Alresford": "Hampshire", "Alston": "Cumbria", "Alton": "Hampshire", "Altrincham": "Cheshire", "Ambleside": "Cumbria", "Amersham": "Buckinghamshire", "Amesbury": "Wiltshire", "Ammanford": "Carmarthenshire", "Andover": "Hampshire", "Anstruther": "Fife", "Antrim": "Co Antrim", "Appleby-in-Westmorland": "Cumbria", "Arbroath": "Angus", "Ardrossan": "Ayrshire", "Armagh": "Co Armagh", "Arthog": "Gwynedd", "Arundel": "West Sussex", "Ascot": "Berkshire", "Ashbourne": "Derbyshire", "Ashburton": "Devon", "Ashford": "Middlesex", "Ashington": "Northumberland", "Ashtead": "Surrey", "Asht |