Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am JayPiKay on github.
  • I am goatfoo (https://keybase.io/goatfoo) on keybase.
  • I have a public key whose fingerprint is 4A4E 03C0 5DE0 CD3B 4138 DDF8 F761 ACE3 7DB7 4B55

To claim this, I am signing this object:

@jaypikay
jaypikay / selenium-screenshotting.md
Created March 21, 2016 10:38 — forked from dannguyen/selenium-screenshotting.md
Using Selenium and Python to screenshot a javascript-heavy page

Using Selenium and Python to screenshot a javascript-heavy page

As websites become more JavaScript heavy, it's harder to automate things like screenshotting for archival purposes. I've seen examples and suggestions to use PhantomJS for visual testing/archiving of websites, but have run into issues such as the non-rendering of webfonts. I've never tried out Selenium until today...and while I'm not thinking about performance implications yet, Selenium seems far more accurate than PhantomJS...which makes sense since it actually opens a real browser. And it's not too hard to script to do complex interactions: here's an [example of how to log in to Twitter, write a tweet, upload an image, and send a tweet via Selenium and DOM element selection](https://gist.github.com/dannguyen/8a6fa49253c1d6a0eb92

@jaypikay
jaypikay / commit-msg
Created August 22, 2012 13:16
git cook to notify gitlab to close issues
#!/bin/sh
PRIVATE_TOKEN="MySecretToken"
GITLAB_URL="https://gitlab.domain.tld/"
URL=`git config --get remote.origin.url`
PROJECT=`basename ${URL} .git | cut -d':' -f2`
for issue_id in `grep -o -e "\(closes\|fixes\) #[0-9]\+" $1 | cut -d'#' -f2`; do
curl -X PUT -d "closed=1" \