Skip to content

Instantly share code, notes, and snippets.

View atdrago's full-sized avatar
👨‍💻

Adam Drago atdrago

👨‍💻
View GitHub Profile
@atdrago
atdrago / index.html
Created December 24, 2012 17:29
A CodePen by atdrago. Card Flip Animation
<div class="container">
<div class="front">front</div>
<div class="back">back</div>
</div>
@atdrago
atdrago / index.html
Created December 24, 2012 17:30
A CodePen by atdrago. Card Flip Animation
<div class="container">
<div class="front">front</div>
<div class="back">back</div>
</div>
@atdrago
atdrago / index.html
Created December 28, 2012 22:56
A CodePen by atdrago.
<div>
<h1>Adam Drago</h1>
</div>
var turf = require('turf');
turf.load('3m-buffered-point.geojson', function (err, data) {
var features = data.features,
point = features[0],
poly = turf.buffer(point, 3, 'miles'),
polyCoords;
polyCoords = poly.features[0].geometry.coordinates[0];
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ffmpeg -i in.mov -s XxY -r 24 -b:v 64k -pix_fmt rgb8 -f gif - | gifsicle --optimize=3 > out.gif
@atdrago
atdrago / fetchClubs.js
Created November 1, 2018 22:25
fetchClubs.js
import config from '../config';
import { handleJsonResponse } from '../util/response';
import {
CLUBS_REQUEST,
CLUBS_SUCCESS,
CLUBS_FAILURE,
INVALIDATE_CLUBS
} from '../actions';
import {
CLUB_FAILURE,
CLUB_REQUEST,
CLUB_SUCCESS,
CLUB_WITH_MEMBERS_FAILURE,
CLUB_WITH_MEMBERS_REQUEST,
CLUB_WITH_MEMBERS_SUCCESS,
CLUBS_REQUEST,
CLUBS_SUCCESS,
CLUBS_FAILURE,
@atdrago
atdrago / lazyRoute.ts
Created October 15, 2020 23:02
Reload page when ChunkLoadError occurs
import { lazy } from 'react';
/**
* Uses React's `lazy` utility underneath, and works the same way, but
* `lazyRoute` will handle the "ChunkLoadError" error by reloading the page.
* This is generally a good solution when the user runs into a "ChunkLoadError"
* while changing routes. All other errors will be passed along as normal.
* @param factory The function that returns the result of webpack's `import`
* @example
* const Page = lazyRoute(() => import('components/pages/Page'));