This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<style class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="es_ES" xmlns="http://purl.org/net/xbiblio/csl"> | |
<!-- This style was edited with the Visual CSL Editor (http://editor.citationstyles.org/visualEditor/) --> | |
<info> | |
<title>UNE 50-104-94</title> | |
<id>http://www.zotero.org/styles/une-50-104-94</id> | |
<link href="https://gist.github.com/ccamara/6580003" rel="self"/> | |
<link href="http://www.aenor.es/aenor/normas/normas/fichanorma.asp?tipo=N&codigo=N0005073&PDF=Si#.UjbzZKxTlhE" rel="documentation"/> | |
<author> | |
<name>Carlos Cámara</name> |
This file contains hidden or 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 | |
/** | |
* Renames a function | |
*/ | |
function yourmodule_default_theme_settings() { | |
$new_variable_name = variable_get('old_variable_name', NULL); //Loads the variable to be renamed from drupal's variables table and assigns it to a new one. | |
variable_set('new_variable_name', $new_variable_name); //Stores $new_variable_name into drupal's variables table. | |
variable_del('old_variable_name'); //Deletes the old variable from drupal's variables table | |
} |
This file contains hidden or 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
# Export database. | |
drush sql-dump > ~/my-sql-dump-file-name.sql | |
# Import database. | |
drush sql-cli < backup.sql |
This file contains hidden or 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
[user] | |
name = Your Name | |
email = [email protected] | |
[color] | |
status = auto | |
branch = auto | |
interactive = auto | |
diff = auto | |
[alias] | |
st = status -sb |
This file contains hidden or 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 | |
/** | |
* Examples of valid statements for a Drush runtime config (drushrc) file. | |
* Use this file to cut down on typing out lengthy and repetitive command line | |
* options in the Drush commands you use and to avoid mistakes. | |
* | |
* Rename this file to drushrc.php and optionally copy it to one of the places | |
* listed below in order of precedence: | |
* |
This file contains hidden or 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 | |
/** | |
* Implements hook_theme_registry_alter(). | |
*/ | |
function feature_blog_theme_registry_alter(&$theme_registry) { | |
$theme_registry['node']['preprocess functions'][] = 'onecolumn_class_node_preprocess'; | |
} | |
/* |
This file contains hidden or 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 | |
/** | |
* Implements hook_install(). | |
*/ | |
function yourmodule_install() { | |
// Populates 'name_of_vocabulary' vocabulary with taxonomy terms. | |
// Edit name_of_vocabulary with your desired vocabulary's machine name. | |
$vocabulary = taxonomy_vocabulary_machine_name_load('name_of_vocabulary'); | |
$terms = array(); |
This file contains hidden or 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 | |
/** | |
* Implements hook_node_validate(). | |
* | |
* Makes image field required. | |
*/ | |
function mymodule_node_validate($node, $form, &$form_state) { | |
if ($node->type == 'carrousel_item') { | |
if (! isset($form_state['values']['field_summary_image'][LANGUAGE_NONE]['0']['entity']->field_media_summary_image[LANGUAGE_NONE][0]['fid']) || |
This file contains hidden or 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
# Drush-Bash tricks 0.1 | |
# Copyright Nuvole 2010. | |
# License: GPL 3, see http://www.gnu.org/licenses/gpl.html | |
# For a quick start: copy this entire file to the end of the .bashrc | |
# file in your home directory and it will be enabled at your next | |
# login. See http://nuvole.org/node/26 for more details and options. | |
# Drupal and Drush aliases. | |
# To be added at the end of .bashrc. |
This file contains hidden or 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
/* | |
* CSS Counters | |
* More information here: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Counters | |
*/ | |
ol{ | |
counter-reset: simple-numbering; // Sets the counter called simple-numbering to 0. | |
li { | |
list-style: none; | |
position: relative; |