Skip to content

Instantly share code, notes, and snippets.

@carlwiedemann
Created April 15, 2013 04:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save carlwiedemann/5385704 to your computer and use it in GitHub Desktop.
Save carlwiedemann/5385704 to your computer and use it in GitHub Desktop.
Diffing the output from a patched drupal site (d8.localhost) to a non-patched drupal site (d8clean.localhost) using HTTPie (https://github.com/jkbr/httpie) and Kaleidescope's ksdiff (http://www.kaleidoscopeapp.com/)
export DRUPALCOOKIECLEAN='SESSa0e1d886dc4b4b88b3a69b139b38d0fd=NOKT1qpWWjYFp0CP3SLf8ejIA-MFrkNIg9vmPP-YEdE'
export DRUPALCOOKIE='SESSe9f6dd3bde2847011220467f468a895f=vQcLvAdPPC4mfmhl_kbwlf4vAhwCWm75AjsC3QGL4UU'
function ddiff() {
URL=$1
# Get clean output
http d8clean.localhost/$URL Cookie:$DRUPALCOOKIECLEAN > /tmp/d8clean-tmp.html
# Get patched output
http d8.localhost/$URL Cookie:$DRUPALCOOKIE > /tmp/d8.html
# Make domains similar
sed -e 's/d8clean/d8/g' /tmp/d8clean-tmp.html > /tmp/d8clean.html
# Kaleidescope diff
ksdiff /tmp/d8clean.html /tmp/d8.html
}
@StryKaizer
Copy link

For linux users, here's a version based on this script:

https://gist.github.com/StryKaizer/5613863

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment