Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Crash IE6 + IE7</title>
<!--[if IE 6]>
<script>
for (x in document.write) {
document.write(x);
}
@dustincurrie
dustincurrie / gist:724183
Created December 1, 2010 20:39
Show background image in jquery cycle on IE
/*
jQuery Cycle has a bug in IE 7 and 8 where a white background is added to cycle elements. That will override background images. If your cycle object has a background image and you use the cleartype fix, the background won't show. Cycle has a property 'cleartypeNoBg' to address this issue. Set the property to true.
*/
$('.mycycleclass')
.cycle({
fx: 'scrollHorz',
cleartype: true,
cleartypeNoBg: true,
});
@dustincurrie
dustincurrie / gist:724169
Created December 1, 2010 20:36
Theme node body with a template file in the feature
<?php
/**
* Implementation of hook_theme().
* DRUPAL WONT SEE THIS HOOK UNTIL YOU CLEAR YOUR CACHE
*/
//Create myfeature-node-body.tpl.php in your feature and use $node to theme the node body
@dustincurrie
dustincurrie / sanitize.sh
Created December 1, 2010 20:21
Sanitize user table in Drupal with Drush
#!/bin/bash
drush sqlq "UPDATE {users} SET pass = md5('pass') WHERE uid > 1;"
drush sqlq "UPDATE {users} SET mail = concat('myaddr+', replace(mail, '@', '_'), '@testdomain.org') WHERE uid <> 0 AND instr(mail, '@testdomain.org') = 0;"