Skip to content

Instantly share code, notes, and snippets.

@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
@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 / 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 / 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 / keybase.md
Created April 17, 2018 18:09
keybase.md

Keybase proof

I hereby claim:

  • I am dguo on github.
  • I am dannyguo (https://keybase.io/dannyguo) on keybase.
  • I have a public key ASAeJVJXzH2XO09KdLbDG4ZMgW0mfo4Lhra-Pr4KS5ykFgo

To claim this, I am signing this object:

@dguo
dguo / selection.css
Last active March 23, 2019 02:37
blog - Custom Website Selection Colors - example
::selection {
color: white;
background: purple;
}
/* for Firefox */
::-moz-selection {
color: white;
background: purple;
}
@dguo
dguo / invalid-selection.css
Last active March 23, 2019 02:36
blog - Custom Website Selection Colors - invalid-selection
::selection, ::-moz-selection {
color: white;
background: purple;
}
@dguo
dguo / specific-selections.css
Last active March 23, 2019 02:37
blog - Custom Website Selection Colors - specific-selections
.iron-man::selection {
color: #beba46;
background:#790d0d;
}
.iron-man::-moz-selection {
color: #beba46;
background: #790d0d;
}
@dguo
dguo / udevmon.yaml
Last active March 23, 2019 02:36
blog - Remap Caps Lock to Escape and Control - caps-lock-configure-udevmon
- JOB: "intercept -g $DEVNODE | caps2esc | uinput -d $DEVNODE"
DEVICE:
EVENTS:
EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
@dguo
dguo / udevmon.sh
Last active March 23, 2019 02:35
blog - Remap Caps Lock to Escape and Control - caps-lock-enable-udevmon
$ sudo systemctl enable udevmon