gist-url: https://gist.github.com/khajavi/24295d78dd390e38f60a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > Constructor "Milad" | |
| > Constructor [Just True, Nothing, Just False] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| code.google.com | |
| googleapis.com | |
| googleusercontent.com | |
| ytimg.com | |
| youtube.com | |
| youtube-nocookie.com | |
| bitbucket.org | |
| thepiratebay.se | |
| humblebundle.com | |
| plus.url.google.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*jshint devel:true, phantom:true*/ | |
| /** | |
| * PhantomJS Cookbook Chapter 3 | Working with webpage Objects Recipe 9 | | |
| * Simulating scrolling in PhantomJS | |
| */ | |
| var webpage = require('webpage').create(); | |
| var jquery = "jquery.min.js"; | |
| webpage.viewportSize = { | |
| width : 1280, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var http = require("http"); | |
| var phantom = require("phantom"); | |
| var util = require('util'); | |
| var url = "http://fa-ir.facebook.com/abdolkarimi.org"; | |
| var jquery = "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"; | |
| phantom.create(function(ph) { | |
| ph.createPage(function(page) { | |
| console.log(util.inspect(page)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| page.evaluate(function() { | |
| var current = 0, delta = 800, total = document.height - delta; | |
| window.scrollTo(0, current); | |
| function fakeScroll() { | |
| if(current < total) { | |
| current = current + delta; | |
| window.scrollTo(0, current); | |
| window.setTimeout(fakeScroll, 100); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function sleep(time, callback) { | |
| var stop = new Date().getTime(); | |
| while (new Date().getTime() < stop + time) { | |
| ; | |
| } | |
| callback(); | |
| } |