Skip to content

Instantly share code, notes, and snippets.

@captovate
captovate / password reset.php
Created October 4, 2013 08:14
To reset the admin password via database: - add this snippet to index.php after drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); - go to page, copy password - revert changes in index.php - go to database and paste password in user table
<?php
require_once 'includes/password.inc';
echo user_hash_password('mynewpassword'); die();
?>
@captovate
captovate / Vendor Mixin
Created September 12, 2013 00:53
Sass vendor mixin
// Create vendor-prefixed CSS in one go, e.g.
// @include vendor(border-radius, 4px);
@mixin vendor($property, $value){
-webkit-#{$property}:$value;
-moz-#{$property}:$value;
-ms-#{$property}:$value;
-o-#{$property}:$value;
#{$property}:$value;
}
@captovate
captovate / White Screen of Death
Created September 11, 2013 01:07
When you're getting a White Screen of Death in Drupal, put this in /index.php and it will output errors on screen.
<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
?>
@captovate
captovate / jquery.pluginOutline.js
Created August 30, 2013 05:45 — forked from StevenBlack/jquery.pluginOutline.js
can someone add a description here please?
// Skeleton jQuery plugin
function($)
{
$.fn.myPlugin = function( options )
{
// options.
$.fn.myPlugin.settings = $.extend( {}, $.fn.myPlugin.defaults, options );
// Go through the matched elements and return the jQuery object.
@captovate
captovate / config.rb
Created August 29, 2013 03:52 — forked from timkelty/config.rb
can someone add a description here please?
# Note that while this file is in our config folder, it is
# symlinked to our site folders, so paths are relative from there
# Require gems and Compass plugins
# require 'rgbapng'
# require 'compass-fancybox-plugin'
require 'compass-growl'
# General
output_style = :expanded