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
// Makes local newspaper archives accessible by altering archive links (PDFs are not password-protected!) | |
(function($) { | |
monthArray = { | |
January: '01', | |
February: '02', | |
March: '03', | |
April: '04', | |
May: '05', | |
June: '06', |
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
// Makes local newspaper pages accessible by undoing poorly written JavaScript protections | |
doWall = function(){}; | |
$('#cboxOverlay').remove(); | |
$('#colorbox').remove(); | |
$('#pagination1').find(':hidden').show(); |
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
#!/bin/bash | |
DATABASE='' | |
POSTGISPATH='' | |
USER='' | |
sudo -u postgres createdb -O $USER $DATABASE | |
sudo -u postgres psql -d $DATABASE -f $POSTGISPATH/postgis/postgis.sql | |
sudo -u postgres psql -d $DATABASE -f $POSTGISPATH/spatial_ref_sys.sql | |
bash $POSTGISPATH/extras/tiger_geocoder/tiger_2010/create_geocode.sh |
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
import requests | |
from pyquery import PyQuery | |
import settings | |
if __name__ == '__main__': | |
# Log in to Alarm.com page | |
payload = { | |
'JavaScriptTest': '1', | |
'cookieTest': '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
// Debugging of Analytics calls via console.log | |
function _gaq_pop() { | |
var max = _gaq.length; | |
// Iterate only up to the current length of the object to prevent issues with _gaq.push being called while in the loop | |
for (var i = 0; i < max; i++) { | |
if (console && console.log) { | |
console.log(_gaq.shift()); | |
} | |
} |
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
cdg () { | |
CD="`~/bin/cdg.sh`" | |
cd $CD | |
} |
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
import nest_thermostat as nest | |
import twilio | |
import twilio.rest | |
from nest_thermostat import utils as nest_utils | |
import settings | |
def main(): | |
sent_message_count = 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
(function ($) { | |
$(function () { | |
var total = 0; | |
var preg = new RegExp(/[^0-9.]/g); | |
$("[id^='item_price'] .a-color-price").each(function () { | |
total += parseFloat($(this).text().replace(preg, "")); | |
}); | |
console.log(total); | |
}); | |
})(jQuery); |