Skip to content

Instantly share code, notes, and snippets.

View TylerK's full-sized avatar
👉
Pushing rectangles around the screen

Tyler Kelley TylerK

👉
Pushing rectangles around the screen
View GitHub Profile
@font-face {
font-family: octicons-link;
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAA
@TylerK
TylerK / fleet-app-next.md
Last active March 6, 2019 21:03
Fleet App Next™
type GpsCoordinate = number;
type DistanceMeasure = number;
type DistanceValue = number;
type Degrees = number;
type Radians = number;
interface GpsCoordinates {
lat1: GpsCoordinate;
long1: GpsCoordinate;
lat2: GpsCoordinate;
@TylerK
TylerK / wtf.html
Last active June 14, 2018 23:20
What the fuck.
<select id="i_cl1" name="i_cl1" class="select-100 form-control bottom-spacer">
<option value="">[select a club]</option>
<optgroup label="Albania - Kampionati Kombëtare">
<option value="1885340">Flamurtari</option>
<option value="2000012886">Kamza</option>
<option value="2000017596">Kukësi</option>
<option value="2000002682">Laçi</option>
<option value="2000017597">Luftëtari</option>
<option value="2000000647">Lushnja</option>
<option value="2147483644">Partizani</option>
@TylerK
TylerK / click-outside.tsx
Last active May 8, 2018 10:47
Click outside higher order component for React written in TypeScript
import React from 'react';
import { findDOMNode } from 'react-dom';
type HocWrapper<P> = React.ComponentClass<P> | React.SFC<P>;
function withClickOutside<P, S>(Component: HocWrapper<P>): React.ComponentClass<P> {
class WrappedComponent extends React.Component<P, S> {
private handleClickOutside = e => {
const bounds = this.wrappedDomNode.getBoundingClientRect();
const mouseX = e.clientX || e.pageX;
@TylerK
TylerK / index.js
Last active February 23, 2017 08:18
React Router 4, React -> Preact for production, Async route-based code-splitting.
import React from 'react'
import { render } from 'react-dom';
import { Router, Route } from 'react-router-dom';
import LazyRoute from 'lazy-route';
const App = () => {
render() {
return (
<Router>
<Route
/**
* Let's say you have a list of 4 icons that need to "pop up" in sequence when their parent element is hovered.
* To give the icons a more initial exageration, use loose "initial" damping and a stiffer "final" damping.
* If you want to give your staggered animation more oomph at the end, reverse these values.
*/
<StaggeredMotion
defaultStyles={[ { y: 10 }, { y: 10 }, { y: 10 }, { y: 10 } ]}
styles={prevInterpolatedStyles => prevInterpolatedStyles.map((_, i) => {
return i === 0
@TylerK
TylerK / writing-better-tickets.md
Last active November 3, 2016 19:26
Writing Better Tickets

Overview

Issue reporting is not solely the domain of most QA departments. As such, many different people can be tasked with reporting issues we come across on our projects. It will make the lives of those on the development side much easier if all issues are written in a consistent manner and contain a minimum amount of necessary information.

Note: This document is not intended to instruct users how to report bugs and improvements. It is intended for fellow developers, QA folks, PM's, and any other employees involved in the software design & development processes.


When to File a Bug Vs. an Improvement

@TylerK
TylerK / node.walk.js
Last active December 2, 2015 03:16
Quick function to walk a local directory and return a Javascript object of it's files\folder structure
/*
* Recursively walk a directory and return JSON.
* @param {string} dir - root dir to walk, must supply this.
* @param {object} structure - internal object to build, no need to supply this.
*/
let walkDir = (dir, structure = []) => {
let files = fs.readdirSync(dir);
files.forEach((node, i) => {
@TylerK
TylerK / index.jsx
Created July 6, 2015 18:29
Multi Column Photo component
import React from 'react';
import Store from './photos.store'
import Photo from './photos.photo'
import PhotoGrid from './photos.grid'
export default React.createClass({
displayName: 'PhotosIndex',
componentWillMount() {
this.setState({