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 | |
echo "hello world"; | |
?> |
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
/* | |
* Accepts any string, and returns a twitter hastag of that string | |
* @text - String to convert to a hashtag | |
*/ | |
function makeHashTag(text) { | |
var v = text.replace(/[^a-z0-9]/gi, ''); | |
if (!isNaN(v[0])) { | |
var fixtr = "num"; | |
switch (v[0]) { |
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 request = $.ajax({ | |
url: "/url/to/your/xss.php", | |
data: {url : 'http://www.google.com/ig/api?weather=Mountain+View'}, | |
dataType: "xml" | |
}); | |
request.done(function(xml) { | |
var weather = $(xml).find("current_conditions > condition").attr('data'); | |
alert('It is '+weather+' in Mountain View'); | |
}); |
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 | |
/* accepts date as a unix timestamp, a string, or empty for today. */ | |
function is_caturday($date=null) | |
{ | |
if (is_numeric($date) && $date !== null) { | |
$time = $date; | |
} elseif($date !== null) { | |
$time = strtotime($date); |
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
Alloy.Globals.settings = {}; // Create Empty Object. | |
/* Settings Getter - Can also just access Alloy.Globals.settings[key] */ | |
Alloy.Globals.settings.get = function(key) { | |
return Alloy.Globals.settings[key] || null; | |
} | |
/* Settings Saver */ | |
Alloy.Globals.settings.set = function(key,value) { | |
var settings = Alloy.createCollection('settings'); |
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
Alloy.Globals.gc = function(ob, parent) { | |
if (ob.children) { | |
for (var c = (ob.children.length - 1); c >= 0; c--) { | |
Alloy.Globals.gc(ob.children[c], ob); | |
} | |
} | |
if (parent) { | |
parent.remove(ob); | |
ob = null; | |
} |
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 | |
$original = $some_variable; | |
$length = 100; | |
echo (strlen($original) > $length)?substr($original,0,$length)."...":$original; | |
?> |
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
87.106.81.107 - - [23/Jan/2013:17:11:55 -0600] "GET /webcalendar/install/index.php HTTP/1.1" 404 2011 | |
87.106.81.107 - - [23/Jan/2013:17:11:55 -0600] "GET /suspended.page/ HTTP/1.1" 200 3448 | |
112.90.138.183 - - [23/Jan/2013:17:13:18 -0600] "GET / HTTP/1.1" 200 116 | |
168.62.202.45 - - [23/Jan/2013:17:13:41 -0600] "GET /men-s-canada-goose-lodge-down-hoody-gray HTTP/1.1" 404 2049 | |
168.62.202.45 - - [23/Jan/2013:17:13:42 -0600] "GET /cgi-sys/defaultwebpage.cgi HTTP/1.1" 200 3477 | |
95.108.150.235 - - [23/Jan/2013:17:14:46 -0600] "GET /robots.txt HTTP/1.1" 404 1977 | |
95.108.150.235 - - [23/Jan/2013:17:14:48 -0600] "GET /cgi-sys/defaultwebpage.cgi HTTP/1.1" 200 1682 |
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(){ | |
$("<style type='text/css'> .crushedTable { table-layout:fixed } .crushMe { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; padding: 0 !important; } </style>").appendTo("head"); | |
tableCrusher(); // run first thing, because we dont need a resize to be broken. | |
var tableCrusherRTime; | |
var tableCrushertableCrusherTimeout = false; | |
var tableCrusherDelta = 200; | |
$(window).resize(function() { | |
tableCrusherRTime = new Date(); | |
if (tableCrusherTimeout === false) { |
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
### Keybase proof | |
I hereby claim: | |
* I am applehat on github. | |
* I am applehat (https://keybase.io/applehat) on keybase. | |
* I have a public key ASBvbRdcl-5Fz2bhd0dJoXbZh2Loc1eFhbOHKny5kqpcOgo | |
To claim this, I am signing this object: |
OlderNewer