Skip to content

Instantly share code, notes, and snippets.

View keopx's full-sized avatar

Ruben Egiguren keopx

View GitHub Profile
(function($){
$.fn.extend({
example: function(options) {
var defaults = {
color: '#000000',
}
<?php
function videodesk_importer_menu() {
$items = array();
$items['admin/config/content/videodesk_importer'] = array(
'title' => 'Videodesk importer',
'description' => 'Configuration for Videodesk importer module',
'page callback' => 'drupal_get_form',
'page arguments' => array('videodesk_importer_form'),
'access arguments' => array('access administration pages'),
@keopx
keopx / debug.md
Created August 20, 2014 15:54 — forked from juampynr/debug.md

Start by logging into MySQL as root:

mysql -u root

Enter the following SQL statements:

SET GLOBAL query_cache_type=OFF;
@keopx
keopx / Classes.php
Last active August 29, 2015 14:05
PHP Classes: when to use :: vs. ->
<?php
/**
* Simply put, :: is for class-level properties, and -> is for object-level properties.
* If the property belongs to the class, use ::
* If the property belongs to an instance of the class, use ->
*/
class Tester
{
public $foo;
-- Verificar donde existe
SELECT *
FROM `variable`
WHERE `value` LIKE '%sites%'
LIMIT 0 , 30;
-- Modificar las variables de sites
UPDATE variable SET file_public_path = REPLACE(file_public_path, 'www.example.com', 'www.drupalexample.com');
UPDATE variable SET file_private_path = REPLACE(file_private_path, 'www.example.com', 'www.drupalexample.com');
@keopx
keopx / move.sh
Last active August 29, 2015 14:06 — forked from juampynr/move.sh
cd sites/example
drush -v sqlq 'UPDATE system SET filename = REPLACE(filename, "example", "example2")'
mv sites/example sites/example2
drush rr -v # This is Registry Rebuild Drush command
# Then, browse your code and search for URLs containing sites/example.
<?php
/**
* @file
* Runs a set of steps to upgrade a database to be in line with code.
*/
/**
* Implements hook_drush_command().
*/
function upgradepath_drush_command() {
- Menu example
-- Tabs
-- Callback
- Page example
-- Permissions
- Block example
- Form example
-- Validate
-- Submit
-- Autocomplete
dependencies[] = ctools
; Views Handlers
files[] = views/mymodule_handler_handlername.inc
@keopx
keopx / checklist.md
Last active August 29, 2015 14:07 — forked from juampynr/checklist.md