Skip to content

Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am jameshopkins on github.
  • I am jameshopkins ( on keybase.
  • I have a public key ASD9KvWSS2LHFfSMQhS6R38Fk7bEhRituTjNfKT1_SHICQo

To claim this, I am signing this object:

jameshopkins /
Last active August 12, 2016 13:23
Demonstration of the disparity between semantic HTML and 'DIV soup'

A simple website header


  <a href="#">Welcome to my site</a>
      <li aria-current="true"><a href="#">home</a></li>
      <li><a href="#">portfolio</a></li>
View gist:e3daa00363a8f5d61e66
  • Renew the server cert when using Boot2Docker - boot2docker ssh 'sudo /etc/init.d/docker restart'
  • Create an interactive shell inside the Docker container - docker run -i -t [IMAGE] "/bin/bash"
jameshopkins / gist:d60c18d66b5c46afb3f7
Last active August 29, 2015 14:09
React CSS in JS
View gist:d60c18d66b5c46afb3f7

##Implementation issues

###How do we expose declaration blocks from at rules? CSSMediaRule instances could be exposed as flags through the content property of a pseudo element (applied to html/body?), and consumed through getComputedStyle. What about other forms?

###How do we deal with merging property shorthands? { background: red }, { background: url('...') yellow }

Unable to use pseudo classes/elements

jameshopkins / gist:0a2aa3ad70d34ba1cc02
Last active August 29, 2015 14:08
Get the original event handler for which a jQuery event was invoked from
View gist:0a2aa3ad70d34ba1cc02
* Return an event type array for a jQuery object.
* Credit to
// Return an arry of 'scroll' events attached to 'window'
$._data($(window).get(0), "events").scroll
jameshopkins / gist:1d84fabcf8dafa1f8086
Created July 2, 2014 11:16
Keep the contents of SASS files up-to-date with existing CSS files on master when retrofitting into an existing project on a feature branch.
View gist:1d84fabcf8dafa1f8086
# Assumes your current directory is where your CSS files live.
for f in *.css; do git mv ${f%.css}.css [SASS DIR]/${f%.css}.scss; done;