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
{capture name='_smarty_debug_header' assign="debug_header"} | |
<div class="heading"> | |
<div style="float:right; width:280px; background-color: transparent;"> | |
<select id="varJump" style="display: block; width:190px; margin: 0px auto;" title="You may use the keyboard by pressing [ENTER] to make your selection."> | |
<option value="#debugTop" selected="selected">*Bryn's Smarty Debug*</option> | |
<option value="#varsTop">*Var Section*</option> | |
{foreach $assigned_vars as $vars} | |
<option value="#anch_{$vars@key|escape:'html'}">VAR {$vars@key|escape:'html'}</option> | |
{/foreach} | |
{if !empty($template_data)}<option value="#tplTop" selected="selected">*Tpl Section*</option>{/if} |
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 | |
/** | |
* Find which buckets a range of records belongs in. | |
* | |
* This function is for using bucketed queries and/or memcache keys. Let's say | |
* you want to have some sort of paginated list displaying 10 records per page. | |
* Which pages do entries 23-31 live on? | |
* | |
* <code> | |
* $recordMarkers = inBuckets( 23, 31, 10 ); |
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
// editable web page | |
(function(){ | |
document.body.contentEditable='true'; | |
document.designMode='on'; | |
})(); | |
// merge arrays | |
(function(){ | |
var a = [1,2,3]; | |
b = [6,5,4]; |
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 () { | |
function bpmv_quick_scratch_pad () { | |
var scrId = 'bpmv_script_from_marklet' | |
, aTagId = 'scratch_pad_marklet_linky' | |
, scr = document.getElementById( scrId ) | |
, aTag = document.getElementById( aTagId ) | |
, bod = document.getElementsByTagName( 'body' )[0] | |
, oldCode = ''; | |
function scratch_not_tab ( ev ) { | |
var aTab = 9; |
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 isvis ( thing ) { | |
if ( typeof(thing) === 'object' ) { | |
try { | |
return ( thing instanceof HTMLElement ) && | |
!( ( thing.offsetWidth === 0 ) && ( thing.offsetHeight === 0 ) ); | |
} catch (e) { | |
return ( thing.nodeType === 1 ) && | |
( typeof(thing.style) === 'object') && | |
( typeof(thing.ownerDocument) ==='object') && | |
!( ( thing.offsetWidth === 0 ) && ( thing.offsetHeight === 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 | |
/********************** | |
Ho Ho Ho script ©2013 UNKNOWN | |
Found online in public source. | |
Considered Public Domain | |
********************************/ | |
?>Ho! Ho! Ho!<?php | |
/******************************** | |
No attribution was found, | |
so you may claim this as your own. |
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
// the meat of this gist - a recursive function for diving namespaces | |
function dive(obj, path) { | |
// split the path, pluck away the first one | |
var sect = (''+path).replace(/^\./, '').split('.'), | |
curr = sect.length > 0? sect.shift(): null, | |
iter; | |
// see if our current desired match exists | |
if(curr && obj && 'undefined' !== typeof obj[curr]) { | |
// last match? then return othewise recurse |
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
/* | |
* Use your whole screen for GitHub! This makes GH's layout more flexible to accomodate widescreen displays. | |
* | |
* Use/Installation: | |
* 1. Get Stylebot at https://chrome.google.com/webstore/detail/stylebot/oiaejidbmkiecgbjeifoejpgmdaleoha?hl=en | |
* 2. Right-click on a GitHub page and select "Stylebot->Style Element" (it doesn't matter which element). | |
* 3. When the Stylebot window opens, click the "edit CSS" button and paste the entire contents of this file in. | |
* 4. (optional) Edit to your tastes if you like, but you may lose the ability to update from this gist unless you | |
* re-make your changes. | |
*/ |
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
// Just run this whole thing on the browser console (copy/paste) | |
// while on the seeding comments page. | |
var stor = {}; | |
var ranks = []; | |
var $tags = $('.commentarea > .nestedlisting > .comment:not(.deleted) > .entry > .tagline'); | |
var rankRpt = 'RANKINGS:'; | |
var matchRpt = 'MATCHES:'; | |
var overRpt = 'OVERFLOW USERS:'; | |
var bye = '*bye*'; |
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
// get the links on the search page for "author:username" limited to the sub | |
var $links = $('.search-result-header > a'); | |
// a place to store some text | |
var mark = '\n'; | |
// loop through the links | |
for(var i = 0; i < $links.length; i++) { | |
// jquery-ify | |
var $link = $($links[i]); |
OlderNewer