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
! Rules to limit FB tracking of me and doing various "scary" things. | |
! Read more: http://nikcub.appspot.com/logging-out-of-facebook-is-not-enough | |
! | |
! The filters live on the Customize tab of AdBlock Options in Chrome. | |
@@http://envoy510.blogspot.com/$document | |
@@||www.blogger.com^$document | |
@@|http://www.peteralfonso.com/2011/02/download-stock-rooted-gingerbread.html|$document |
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 parseURL(url) { | |
var a = document.createElement('a'); | |
a.href = url; | |
return { | |
source: url, | |
protocol: a.protocol.replace(':',''), | |
host: a.hostname, | |
port: a.port, | |
query: a.search, | |
params: (function(){ |
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
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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 gup( name ){ | |
var cre_getDocIdelement = document.getElementById( 'gbmpm_0_l' ); | |
name = name.replace( /[\[]/,"\\\[" ).replace( /[\]]/,"\\\]" ); | |
var regexS = "[\\?&]" + name + "=([^&#]*)"; | |
var regex = new RegExp( regexS ); | |
var results = regex.exec( cre_getDocIdelement ); | |
if( results == null ) 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
Options +FollowSymLinks | |
RewriteEngine on | |
RewriteCond %{THE_REQUEST} ^.*\/index\.html? | |
RewriteRule ^(.*)index\.html?$ http://example.com$1 [R=301,L] | |
# More resources: | |
# | |
# http://old.justinshattuck.com/2007/01/19/apache-mod_rewrite-cheat-sheet/ | |
# http://net.tutsplus.com/tutorials/other/a-deeper-look-at-mod_rewrite-for-apache/ |
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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /path/to/front/of/site/under/root/directory/local_example_com/ | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /path/to/front/of/site/under/root/directory/local_example_com/index.php [L] | |
</IfModule> |
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
<div id="feedbackGadget" style="left: 359px; top: 20px; visibility: hidden; display: none; " class="gn-gaiabar-gadget"> | |
<div id="feedbackIframe"> | |
<iframe id="feedbackIframeId" name="feedbackIframeId" class="gn-gaiabar-iframe" src="https://spreadsheets.google.com/embeddedform?key=pPo2nzr1TywUz6Kp4cvV6NA&hl=en&gridId=0" frameborder="0" style="height: 320px; width: 480px;"> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>Feedback</title> |
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
<?php | |
$url = "http://icanhascheezburger.com"; | |
$html = file_get_contents($url); | |
$dom = new DomDocument(); | |
@$dom->loadHTML($html); | |
$xpath = new DOMXPath($dom); | |
$img = $xpath->evaluate("//div[@class='entry']//img")->item(0); | |
$imgSrc = $img->getAttribute('src'); | |
print("<img src=\"$imgSrc\" />"); |
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
<?php | |
$weather_loc = 10001; | |
function getWeather( $weather_loc ) { | |
// weather data url, location based | |
$requestAddress = 'http://www.google.com/ig/api?weather=$weather_loc&hl=en'; | |
// Parse XML | |
$xml_str = file_get_contents($requestAddress,0); |
NewerOlder