This file contains 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 Spooky, config, i, run_spooky, scraping, spooky, spooky_is_ready; | |
Spooky = require('spooky'); | |
config = { | |
child: { | |
port: 8081 | |
} | |
}; |
This file contains 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 pageParser() { | |
return { | |
url : window.location.href, | |
title : $('title').text(), | |
description : $('meta[name="description"]').attr('content') | |
}; | |
} |
This file contains 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
Reference: http://stackoverflow.com/questions/1261975/addressing-localhost-from-a-virtualbox-virtual-machine | |
In Virtual Box - running Windows: | |
You can reach your localhost via: | |
http://10.0.2.2 | |
If you need to link to vhosts on your localhost though you need to update the virtual box's hosts file |
This file contains 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
module.exports = { | |
clientScripts : [ | |
'./node_modules/jquery/dist/jquery.min.js', | |
'./node_modules/lodash/index.js' | |
], | |
viewportSize : { | |
width: 1600, | |
height: 1200 | |
}, | |
timeout : 50000, |
This file contains 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 countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
This file contains 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 checkAnalytics () { | |
var ids = ga.getAll(); | |
var len = ids.length; | |
console.log('Universal Analytics'); | |
console.log('ids', ids); | |
console.log('======================================================='); | |
console.log('Number of Universal Analytics IDs found : ' + ids.length); | |
console.log('======================================================='); | |
console.log('Universal Analytics IDs'); | |
console.log('======================================================='); |
This file contains 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
<?php | |
/** | |
* This snippet adds extra classes to Drupal | |
* menu leafs (li tags) and menu itself (ul tags). | |
*/ | |
/** | |
* Since the standart preprocess function for menu tree, which is | |
* template_preprocess_menu_tree, located in includes/menu.inc, |
This file contains 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 checkAnalytics () { | |
var ids = ga.getAll(); | |
var len = ids.length; | |
console.log('Universal Analytics'); | |
console.log('ids', ids); | |
console.log('======================================================='); | |
console.log('Number of Universal Analytics IDs found : ' + ids.length); | |
console.log('======================================================='); | |
console.log('Universal Analytics IDs'); | |
console.log('======================================================='); |
This file contains 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
<?php | |
/** | |
* Class TransformerAbstract | |
* contains functions for validating fields | |
* | |
* @package Drupal\streamtime | |
*/ | |
abstract class TransformerAbstract { |