Skip to content

Instantly share code, notes, and snippets.

<!--
Progressive Disclosure Demo - Updated 15 August, 2012 by Ros
Thank you for taking a look under the hood of our progressive disclosure demo. Please note that this is a work in progress, so it's a tad messy and bound to change.
If you have any questions, feel free to pop a line to support@campaignmonitor.com - we might learn something, too!
Known bugs
----------
#!/bin/sh
cd /usr/local/share
wget https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-i686.tar.bz2
tar -xjf /usr/local/share/phantomjs-1.9.0-linux-i686.tar.bz2
sudo ln -sf /usr/local/share/phantomjs-1.9.0-linux-i686/bin/phantomjs /usr/local/bin/phantomjs
git clone git://github.com/n1k0/casperjs.git /usr/local/src/casperjs
cd /usr/local/src/casperjs
git checkout tags/1.0.2
ln -sf /usr/local/src/casperjs/bin/casperjs /usr/local/bin/casperjs
/**
* @file
* Testing a demo of Drupal. The script will log in and check for various
* features in Drupal core. This demo was inspired by a similar script for
* a Wordpress site. The original script was written by Henrique Vicente.
*
* @see https://github.com/henvic/phantom-casper-simple-talk/blob/master/wordpress.js
*/
// Set up variables to visit a URL and log in.
@ianlintner-wf
ianlintner-wf / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
var dns = require('dns');
function reverseLookup(ip) {
dns.reverse(ip,function(err,domains){
if(err!=null) callback(err);
domains.forEach(function(domain){
dns.lookup(domain,function(err, address, family){
console.log(domain,'[',address,']');
console.log('reverse:',ip==address);