Skip to content

Instantly share code, notes, and snippets.

@dguo
dguo / click.js
Last active November 10, 2017 14:28
Load all Stop and Shop digital coupons
// There are hundreds of coupons each week. Load them all just in case.
document.querySelectorAll('.js-load-to-card').forEach(button => button.click());
@dguo
dguo / images-original.json
Last active July 16, 2017 23:17
PawBlock
{
"sets": [
{
"name": "rabbit",
"sad": "https://i.imgur.com/qickpZA.jpg",
"happy": "https://i.imgur.com/STeEP2W.jpg"
},
{
"name": "dog",
"sad": "https://i.imgur.com/PYNvUnA.jpg",
@dguo
dguo / replace.sh
Last active July 11, 2017 21:27
Hacky codeshift to use React's prop-types package
# https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.proptypes
# I didn't feel like downloading their codeshift.
#
# in all files in current directory, replace:
# import React, {Component, PropTypes} from 'react';
#
# with:
# import React, {Component} from 'react';
# import PropTypes from 'prop-types';
@dguo
dguo / clean-reveal.sh
Created September 3, 2016 21:22
Clean up a reveal.js source folder
#!/usr/bin/env bash
echo Cleaning files..
rm -r test CONTRIBUTING.md .travis.yml package.json Gruntfile.js bower.json demo.html
echo "# README" > README.md
echo Done