Skip to content

Instantly share code, notes, and snippets.

View ArunSahadeo's full-sized avatar

Arun Sahadeo ArunSahadeo

View GitHub Profile
# Install dependencies
cask_args appdir: '/Applications'
brew "android-platform-tools"
var page = require('webpage').create();
page.viewportSize = {
width: 1800,
height: 3000
};
page.open('http://www.bbc.co.uk/', function(status) {
console.log("Status: " + status);
if(status === "success") {
console.log('Rendering into Pictures_BBC folder...');
page.render('Pictures/Pictures_BBC/bbc_test_2.png');
var width = 1800;
var height = 3000;
var webpage = require('webpage');
page = webpage.create();
page.viewportSize = {width: width, height: height};
page.open('http://www.bbc.co.uk/', function(status) {
console.log(status);
page.evaluate(function(w, h) {
document.body.style.width = w + "px";
var width = 1692;
var height = 5178;
var webpage = require('webpage');
page = webpage.create();
page.viewportSize = {width: width, height: height};
page.open('https://gist.github.com/', function(status) {
console.log(status);
page.evaluate(function(w, h) {
document.body.style.width = w + "px";