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
The company maintains similar offices in Cape Town, South Africa, and outside Portland, Maine, and gives employees a $250-a-month stipend if they want to use commercial co-working offices elsewhere. |
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
# Update the 2nd instance of AllowOverride, which is in the docroot Directory directive | |
perl -pi -e 's{AllowOverride None}{++$n == 1 ? "AllowOverride All" : $&}ge' /usr/local/apache2/conf/httpd.conf | |
# Tack the mod_rewrite module load on to the end of the file | |
echo 'LoadModule rewrite_module modules/mod_rewrite.so' >> /usr/local/apache2/conf/httpd.conf |
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
Pillow==3.4.1 | |
python-resize-image==1.1.3 |
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
# Slow GIF | |
RewriteRule ^slowfile.gif$ slowfile.php [L] |
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() { | |
function async_load(){ | |
var s = document.createElement('script'); | |
s.type = 'text/javascript'; | |
s.async = true; | |
s.src = 'http://yourdomain.com/script.js'; | |
var x = document.getElementsByTagName('script')[0]; | |
x.parentNode.insertBefore(s, x); | |
} | |
if (window.attachEvent) |
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
const intersect = (leftArray, rightArray) => leftArray.filter(value => rightArray.indexOf(value) > -1); |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title><!-- change me --></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> | |
<!-- change me --> |
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
from selenium import webdriver | |
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary | |
binary = FirefoxBinary("/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox") | |
browser = webdriver.Firefox(firefox_binary=binary) | |
# Or, in your terminal session: PATH=$PATH:/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox |
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
// Utility for ducking Discovery under fixed agent navigation bars and ads | |
var discoDuck = (function() { | |
var _discoveryContainer = $("#discoveryContainer"); | |
var _proNavBarHeight = $("#navbarAgent").outerHeight(); | |
var _proCatcherHeight = $("#pro_catcher").outerHeight(); | |
var _adjustMarginTop = function(pixels, addOrRemove) { | |
if(_discoveryContainer.length < 1) { | |
return; | |
} |
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
// Written for this Wikipedia page on 2015-10-18: | |
// https://en.wikipedia.org/wiki/List_of_motor_vehicle_deaths_in_U.S._by_year | |
var deaths = 0; | |
$("table.wikitable").first().find("tr").each( | |
function() { | |
var deathsCell = $(this).find("td").first().text(); | |
var pattern = new RegExp("([\d,,]+)[^\d,,]?") | |
deathsNum = parseInt(deathsCell.replace(/,/g, ""), 10); | |
if(!isNaN(deathsNum)) { | |
deaths += deathsNum; |