The script:
/*global casper:true*/
var casper = require('casper').create({
pageSettings: {
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Firefox/31.0"
}
a = setInterval(function () { | |
window.scrollTo(0,document.body.scrollHeight); | |
$('.not-following .user-actions-follow-button.js-follow-btn').click(); | |
}, 1000); | |
// To stop it | |
clearInterval(a) |
a = setInterval(function () { | |
window.scrollTo(0,document.body.scrollHeight); | |
$('.ProfileTweet-actionButton.js-actionButton.js-actionFavorite:visible').click(); | |
}, 1000) | |
// To stop it | |
clearInterval(a) |
// Node.js CheatSheet. | |
// Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
// Download: http://nodejs.org/download/ | |
// More: http://nodejs.org/api/all.html | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
// PhantomJS Cheatsheet | |
$ brew update && brew install phantomjs // install PhantomJS with brew | |
phantom.exit(); | |
var page = require('webpage').create(); | |
page.open('http://example.com', function() {}); | |
page.evaluate(function() { return document.title; }); |
// Mixpanel Cheatsheet | |
// This requires the mixpanel javascript library to be embedded on your site | |
// https://mixpanel.com/help/reference/javascript-full-api-reference | |
// 1. API Methods. | |
mixpanel.init('new token', { your: 'config' }, 'library_name'); // initialize a new instance of the Mixpanel tracking object | |
mixpanel.push(['register', { a: 'b' }]); // push() keeps the standard async-array-push behavior around after the lib is loaded. This is only useful for external integrations that do not wish to rely on our convenience methods (created in the snippet). |
# SYNTAX: | |
var pattern = new RegExp(pattern, attributes); # attributes: g (global); i (case-sensitive); m (multiline matches) | |
var pattern = /pattern/attributes; # same as above | |
# BRACKETS: | |
[...]: Any one character between the brackets. | |
[^...]: Any one character not between the brackets. |
I hereby claim:
To claim this, I am signing this object: