Skip to content

Instantly share code, notes, and snippets.

Map Data for Beginners

Data Formats

  • Shapefiles
  • *.shp
  • *.shx
  • *.dbf
  • *.prj
  • *.cpg
@EmperorEarth
EmperorEarth / CREDIT
Last active February 1, 2016 17:05
React-Router's onEnter <> requireAuth read from Redux store
// Comment: http://stackoverflow.com/questions/33643290/how-do-i-get-a-hold-of-the-store-dispatch-in-react-router-onenter/34278483#34278483
// User: http://stackoverflow.com/users/184532/kjs3
@joepie91
joepie91 / promises-reading-list.md
Last active June 25, 2023 09:12
Promises (Bluebird) reading list

Promises reading list

This is a list of examples and articles, in roughly the order you should follow them, to show and explain how promises work and why you should use them. I'll probably add more things to this list over time.

This list primarily focuses on Bluebird, but the basic functionality should also work in ES6 Promises, and some examples are included on how to replicate Bluebird functionality with ES6 promises. You should still use Bluebird where possible, though - they are faster, less error-prone, and have more utilities.

I'm available for tutoring and code review :)

You may reuse all gists for any purpose under the WTFPL / CC0 (whichever you prefer).

@aldendaniels
aldendaniels / alternative-to-higher-order-components.md
Last active October 6, 2018 09:50
Alternative to Higher-order Components

React now supports the use of ES6 classes as an alternative to React.createClass().

React's concept of Mixins, however, doesn't have a corollary when using ES6 classes. This left the community without an established pattern for code that both handles cross-cutting concerns and requires access to Component Life Cycle Methods.

In this gist, @sebmarkbage proposed an alternative pattern to React mixins: decorate components with a wrapping "higher order" component that handles whatever lifecycle methods it needs to and then invokes the wrapped component in its render() method, passing through props.

While a viable solution, this has a few drawbacks:

  1. There's no way for the child component to override functionality defined on the higher order component.
@aanari
aanari / Questions.md
Last active August 29, 2015 14:14
Campaign Questions Spec
@dragonai
dragonai / README.md
Last active October 9, 2015 01:09
Rollbar Time of Last Deploy

##Preview

Description

Simple Dashing widget that displays how long ago the last deploy was according to Rollbar.

##Usage

@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
require 'pp'
require 'httparty'
class PagerDuty
include HTTParty
format :json
def initialize(subdomain, api_token)
@options = {
:headers => {
"Authorization" => "Token token=#{api_token}",
@throughnothing
throughnothing / coinbase-price.pl
Created December 2, 2013 18:39
Get Coinbase BTC Price
#!/usr/bin/env perl
use v5.10; use ojo;
say g('https://coinbase.com/api/v1/prices/buy')->json->{subtotal}{amount};
@larrybotha
larrybotha / readme.markdown
Last active October 27, 2021 04:28
Postfix Using Gmail SMTP in Mac OSX Mavericks