As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
configdocs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public - Sep 07, 2020 update docs for
npm version
| -module(date_util). | |
| -compile(export_all). | |
| epoch() -> | |
| now_to_seconds(now()) | |
| . | |
| epoch_hires() -> | |
| now_to_seconds_hires(now()) | |
| . |
| If: | |
| - you add and commit with the wrong email address in git, and | |
| - your remote has a hook set up to prevent you from pushing with the bad address | |
| Then you need to amend the author of your commit before push can succeed: | |
| 1. fix your email address in git config: | |
| $ git config user.name "Your Name" |
| %% Simple web server. | |
| -module(sws). | |
| -author('Steve Vinoski <[email protected]>'). | |
| -export([start/1, start/2]). | |
| %% start/1 takes a handler function and starts the web server on port 8000. | |
| %% start/2 takes a handler function and a port number. The handler function | |
| %% takes two arguments: a TCP socket and request data. The request data is | |
| %% a property list indicating the invoked HTTP method, the target URI, the |
This is a d3.js visualization of US zip codes.
Original zip code dataset from Geocommons.
5MB shapefile with properties such as zipcode, state, name, population, area, more.
http://geocommons.com/overlays/54893 (Thank you Bill Greer)
This converts it nicely:
| (function() { | |
| var π = Math.PI, | |
| degrees = 180 / π, | |
| radians = π / 180, | |
| ε = 1e-15, | |
| circle = d3.geo.circle().angle(90); | |
| d3.geo.voronoi = function(points, triangles) { | |
| if (arguments.length < 2) triangles = d3.geo.delaunay(points); |
| // usage: var PPC = new PointerPointerClone(); | |
| // you need to actually put images in; i haven't | |
| // fill in at least one for each quadrant, starting at line 24 | |
| // use the centers of each quadrant: (0.25,0.25), (0.25,0.75), (0.75,0.25), (0.75),(0.75) | |
| // then you'll be able to see it working | |
| function PointerPointerClone(Target, MoveThreshhold, MinTimeThreshhold) { |
| var counter = 0, | |
| repaint = () => React.render(document.body, <Spinner data={counter}/>), | |
| inc = () => { counter += 1, repaint() }, | |
| dec = () => { counter -= 1, repaint() }, | |
| Spinner = React.createClass({ | |
| render: function() { |
| 23.21.150.121:3478 | |
| iphone-stun.strato-iphone.de:3478 | |
| numb.viagenie.ca:3478 | |
| s1.taraba.net:3478 | |
| s2.taraba.net:3478 | |
| stun.12connect.com:3478 | |
| stun.12voip.com:3478 | |
| stun.1und1.de:3478 | |
| stun.2talk.co.nz:3478 | |
| stun.2talk.com:3478 |
| // this is the react app. it knows nothing of the vanilla app, other than that the information | |
| // will come in in props, and that it should call this hook when this button is pressed, or etc | |
| var Spinner = (props) => | |
| <div> | |
| {this.props.data} | |
| <button value="↑" onclick={this.props.hooks.inc}/> | |
| <button value="↓" onclick={this.props.hooks.dec}/> | |
| </div>; |