Skip to content

Instantly share code, notes, and snippets.

View clytras's full-sized avatar

Christos Lytras clytras

View GitHub Profile
@clytras
clytras / quotes_json.js
Created March 15, 2017 08:49 — forked from mickaelandrieu/quotes_json.js
Scrap a website with CasperJs, JSON output.
var links = [];
var quotes = [];
var tempUrl = [];
var infos = [];
var maxLinks = 10;
var firstUrl = 'http://www.imdb.com/search/title?at=0&num_votes=5000,&sort=user_rating,desc&start=1&title_type=tv_infoss';
var newUrl;
var x = require('casper').selectXPath;
@clytras
clytras / gist:8afdbd1f4fd7088da5af9e66ff0e3d75
Created March 14, 2017 08:28 — forked from kbingman/gist:6557074
external include for casper.js login and preview
var require = patchRequire(require);
var loginAndPreview = function(baseUrl, bundleLocation, test){
casper.start('http://preview.mobify.com/', function suite() {
// Add a title comment so that you know what's happening and when
casper.test.comment('Lululemon - 2013 Refresh');
// Log out what we are doing
@clytras
clytras / nginx.conf
Created December 18, 2016 01:37 — forked from jrom/nginx.conf
nginx hack for multiple conditions
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";