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 | |
$posts = multisite_latest_post( array( | |
"how_many"=>10, | |
"how_long_days"=>30, | |
"how_many_words"=>50, | |
"more_text"=>"[...]", | |
"remove_html"=>true, | |
"sort_by"=>"post_date", | |
// if paginating: | |
"paginate"=>true, |
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
// Plugin | |
$.fn.iWouldLikeToAbsolutelyPositionThingsInsideOfFrickingTableCellsPlease = function() { | |
var $el; | |
return this.each(function() { | |
$el = $(this); | |
var newDiv = $("<div />", { | |
"class": "innerWrapper", | |
"css" : { | |
"height" : $el.height(), | |
"width" : "100%", |
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 | |
/* | |
Template Name: Comment Graph | |
*/ | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8> |
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 fs_login($user, $pass) { | |
$uname = $user; | |
$pass1 = $pass; | |
$credentials = array( | |
'user_login' => $user, | |
'user_password' => $pass, | |
'remember' => true | |
); | |
$user = wp_signon($credentials, false); | |
if( $user->ID ){ |
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
/* ------------------------------------------------------------------------ | |
* Class: prettyPhoto | |
* Use: Lightbox clone for jQuery | |
* Author: Stephane Caron (http://www.no-margin-for-errors.com) | |
* Version: 3.0.1 | |
* ------------------------------------------------------------------------- */ | |
(function($){$.prettyPhoto={version:'3.0'};$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend({animation_speed:'fast',slideshow:false,autoplay_slideshow:false,opacity:0.80,show_title:true,allow_resize:true,default_width:500,default_height:344,counter_separator_label:'/',theme:'facebook',hideflash:false,wmode:'opaque',autoplay:true,modal:false,overlay_gallery:true,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},markup:'<div class="pp_pic_holder"> \ | |
<div class="ppt"> </div> \ | |
<div class="pp_top"> \ |
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 | |
define('ALPHABET_SIZE',1); | |
function compute_prefix($str,$size,&$result=0) | |
{ | |
$result = $result[$size + 1]; | |
$q; | |
$k; | |
$result[0] = 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
<?php | |
define('UCHAR_MAX',255); | |
function boyermoore_horspool_memmem($haystack,$needle){ | |
$hlen = strlen($haystack); | |
$nlen = strlen($needle); | |
$scan = 0; | |
$bad_char_skip[UCHAR_MAX + 1]; | |
if ($nlen <= 0 || !$haystack || !$needle) { return NULL; } | |
for ($scan = 0; $scan <= UCHAR_MAX; $scan = $scan + 1) | |
$bad_char_skip[$scan] = $nlen; |
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 (Backbone) { | |
// Store blank stuff here | |
var blankEl = $() | |
, blankModel = new Backbone.Model.extend() | |
, blankCollection = new Backbone.Collection.extend({ | |
model: blankModel | |
}) | |
, blankView = new Backbone.View.extend({ | |
el: blankEl | |
}) |
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 | |
define('LOCK_FILE', isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : '/tmp/secondcrack-updater.pid'); | |
// Ensure that no other instances are running | |
if (file_exists(LOCK_FILE) && | |
($pid = intval(trim(file_get_contents(LOCK_FILE)))) && | |
posix_kill($pid, 0) | |
) { | |
fwrite(STDERR, "Already running [pid $pid]\n"); | |
exit(1); |
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 | |
// ----- Don't edit this ----------------- | |
require_once(dirname(__FILE__) . '/engine/Updater.php'); | |
// --------------------------------------- | |
// ----- You can edit these settings: ----- | |
date_default_timezone_set('America/New_York'); // Sometimes I hate PHP. This is one of those times. |
OlderNewer