Skip to content

Instantly share code, notes, and snippets.

@jerrylopez
jerrylopez / clear_cms.sql
Created June 12, 2014 18:42
Clear the CMS Static Blocks and Pages from Magento database in one swoop!
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `cms_block`;
TRUNCATE TABLE `cms_block_store`;
TRUNCATE TABLE `cms_page`;
TRUNCATE TABLE `cms_page_store`;
SET FOREIGN_KEY_CHECKS = 1;
@jerrylopez
jerrylopez / checkallboxes.js
Created May 19, 2014 19:38
Check all checkboxes
/*
*
* Found at : http://jsfiddle.net/YxUHw/
*
* You can use this to check all check boxes just in case you have a crap load
* and there is no checkall button.
*
*/
(function () {
var checkboxes = document.querySelectorAll('input[type=checkbox]');
@jerrylopez
jerrylopez / grabbit.js
Created April 25, 2014 15:26
This is a simple jQuery plugin that lets you grab the url parameter value and append it to any input you'd like.
// This is a simple jQuery plugin that lets you grab the url parameter value and append it to any input you'd like .
//
// Example:
// Your url is : http://myurl.com/?name=Jerry&last=Lopez&age=21
//
// Now lets say you have a form that you want prefilled when a user visit the form. You can
// can accomplish that with grabbit it will pull the name, last and age parameters then add
// them to the input fields you specify.
//
// Usage: