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 mayfield_preprocess_image(&$variables) { | |
unset ($variables['width'], $variables['height'], $variables['attributes']['width'],$variables['attributes']['height']); | |
} |
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
<nav> | |
<ul> | |
<?php foreach ($items as $delta => $item): ?> | |
<li><?php print render($item); ?></li> | |
<?php endforeach; ?> | |
</ul> | |
</nav> |
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
#!/usr/bin/ruby | |
# IE Media Query Converter | |
# Usage: IEMQConv.rb filein fileout | |
# | |
# Grabs all media query content in a CSS file and outputs a file | |
# containing all of the CSS without the media query tags. | |
# Useful for giving <=IE8 all of the site styles without | |
# media query support. |
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 | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
// connect | |
$m = new Mongo(); | |
// select a database | |
$db = $m->mongotest; |
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 | |
/* PHP FORM PROCESSOR | |
* A simple form processor with basic validation | |
* Sends with local mail() protocol | |
*/ | |
class FormProc{ | |
/* ATTRIBUTES */ | |
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 moveElement(elem, container) { | |
var elemobj = $(elem); | |
var containerobj = $(container); | |
if(!elemobj.parent().is(container)) // Check if already there | |
elemobj.appendTo(container); | |
} |
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
$('.accordion .item').addClass('closed').click(function(){ | |
if($(this).hasClass('closed')) { | |
$(this).removeClass('closed').addClass('open').children('.content').show('fast'); | |
$(this).parent().children().not($(this)).removeClass('open').addClass('closed').children('.content').hide('fast'); | |
} else { | |
$(this).removeClass('open').addClass('closed').children('.content').hide('fast'); | |
} | |
}); |
OlderNewer