Skip to content

Instantly share code, notes, and snippets.

View ryanashcraft's full-sized avatar

Ryan Ashcraft ryanashcraft

View GitHub Profile
@ryanashcraft
ryanashcraft / NowPlayingView.jsx
Last active July 5, 2018 19:59
AmpliTunes with react-amplitude
import React, { Fragment } from "react";
import { Amplitude, LogOnMount } from "@amplitude/react-amplitude";
const NowPlayingView = props => {
return (
<Amplitude
// All events logged in this subtree will include these event properties
eventProperties={inheritedProps => ({
...inheritedProps,
"song id": props.songId,
@ryanashcraft
ryanashcraft / Makefile
Last active August 4, 2017 16:07
Ghost on Docker Makefile
DOCKER_IMAGE ?= ryanashcraft/ghost:1.0
DOCKER_CONTAINER ?= ghost
dev:
docker build -f Dockerfile.dev -t $(DOCKER_IMAGE) .
docker rm $(DOCKER_CONTAINER) && docker run \
-p 2368:2368 \
-v ${PWD}/content/data:/var/www/ghost/content/data \
-v ${PWD}/content/images:/var/www/ghost/content/images \
--name $(DOCKER_CONTAINER) \
@ryanashcraft
ryanashcraft / HN
Last active September 13, 2016 20:33
https://news.ycombinator.com/
## API
### Top Stories
https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty
### Story
@ryanashcraft
ryanashcraft / DeepDiff.js
Created January 7, 2016 19:37
DeepDiff.js
/*!
* deep-diff.
* Licensed under the MIT License.
*/
;(function(root, factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], factory);
} else if (typeof exports === 'object') {