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
# Regex to count paths with 4 slashes | |
(\/[^\/]*){4} | |
# Regex to count paths with starting text | |
\/issues(\/[^\/]*){3} |
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
import re | |
words = re.findall(r'\w+', open('term-list.csv').read().lower()) | |
counts = Counter(words).most_common(500) |
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
riveted.init({ | |
eventHandler: function(data) { | |
if (data == 10) { | |
ga('send', 'event', 'Non-Bounce', 'True'); | |
} | |
} | |
}); |
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
-----BEGIN WEBFACTION INSTALL SCRIPT----- | |
#!/bin/env python2.4 | |
""" | |
Nginx 0.7.65 Installer New | |
"autostart": not applicable | |
"extra info": Enter domain name for the nginx app | |
""" |
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
{ | |
"keywords": [ | |
{ | |
"text": "natural gas", | |
"relevance": 0.957925 | |
}, | |
{ | |
"text": "natural gas meters", | |
"relevance": 0.832745 | |
}, |
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
/* | |
* Inspired by (directly copied from) Mathias Bynens' optimized Google Analytics snippet | |
* http://mathiasbynens.be/notes/async-analytics-snippet | |
* Not fully tested, use at own risk! | |
*/ | |
<script> | |
var clicky = { log: function(){ return; }, goal: function(){ return; }}, | |
clicky_site_id = XXXXXX; | |
(function(d, t) { |
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
// removes WordPress inline style width on captions | |
add_filter( 'img_caption_shortcode_width', '__return_zero' ); |
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
if (window.Notification) { | |
Notification.requestPermission(function() { | |
setTimeout(function(){ | |
var n = new Notification('News Alert', { | |
'body' : 'S&P Surpasses 2000' | |
}); | |
n.onclick = function() { | |
location.href = 'http://'; |
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($, window, undefined) { | |
"use strict"; | |
var Plugin = function(element, options) { | |
this.element = element; | |
this.$element = $(element); | |
this.init(); | |
}; |
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
sudo env PATH=$PATH dowhatever | |
Example: | |
sudo env PATH=$PATH npm uninstall -g less |