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
var normalize = (function() { | |
var from = "ÃÀÁÄÂÈÉËÊÌÍÏÎÒÓÖÔÙÚÜÛãàáäâèéëêìíïîòóöôùúüûÑñÇç", | |
to = "AAAAAEEEEIIIIOOOOUUUUaaaaaeeeeiiiioooouuuunncc", | |
mapping = {}; | |
for(var i = 0, j = from.length; i < j; i++ ) | |
mapping[ from.charAt( i ) ] = to.charAt( i ); | |
return function( str ) { | |
var ret = []; | |
for( var i = 0, j = str.length; i < j; i++ ) { | |
var c = str.charAt( i ); |
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
SELECT DISTINCT `title` | |
FROM `aggregator_item` | |
WHERE `title` IN | |
(SELECT * | |
FROM | |
(SELECT DISTINCT `title` | |
FROM {aggregator_item} ORDER BY `iid` desc limit $first_page, $last_page) as titles) |
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 | |
$existing_filepath = "/home/nzcodarnoc/sites/default/files/imported/picture.jpg" | |
$new_filepath = "public://picture.jpg" | |
// Load a node | |
$node = node_load($nid, NULL, TRUE); | |
// Create the file object | |
$drupal_file = file_save_data(file_get_contents($existing_filepath), $new_filepath); | |
$drupal_file->alt = $node->title; | |
$drupal_file->title = $node->title; | |
// Assign the file object to the node, as an 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 | |
$form['#prefix'] = '<div id="wrapper-form">'; | |
$form['#suffix'] = '</div>'; | |
$form['hidden_tipo'] = array( | |
'#type' => 'hidden', | |
'#value' => $tipo, | |
); | |
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
##### Meter en el .bashrc ################################ | |
export PATH="$PATH:/usr/local/share/drush:/usr/local/bin" | |
export http_proxy=http://user:pass@IP:Port | |
export ftp_proxy=http://user:pass@IP:Port | |
## Recargar el fichero .bashrc sin tener que reiniciar la consola | |
source ~/.bashrc | |
##### Meter en el /etc/apt/sources.list ################## | |
# non free packages | |
deb http://ftp.fr.debian.org/debian/ squeeze non-free |
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
; This file was auto-generated by drush make | |
core = 7.x | |
api = 2 | |
projects[drupal][version] = "7.x" | |
; Profiles | |
; Please fill the following out. Type may be one of get, git, bzr or svn, | |
; and url is the url of the download. | |
projects[soc][download][type] = "" |
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
# Installing ia32-libs | |
apt-get install ia32-libs | |
# Installing LAMP | |
apt-get install mysql-server | |
apt-get install phpmyadmin | |
# Installing browsers | |
apt-get install chromium |
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
# Configurations of editor and bash | |
# as root, in /etc/vim/vimrc uncomment | |
syntax on | |
# as root, in /etc/bash.bashrc add after 'alias ls' | |
alias ll='ls -l --color=auto' | |
# Config for apache, php, mysql,... | |
cd /etc/apache2/mods-enabled/ | |
ln -s ../mods-available/rewrite.load |
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
#!/bin/bash | |
# DATOS | |
WEB_ROOT=/apps/ | |
BACKUP_ROOT=/home/core/backups | |
DB_USER=backup #Permiso para SELECT y LOCK TABLES | |
DB_PASSWORD=b4ckup | |
DAYS_FOR_BACKUP=100 | |
DATE=$( date -I ) |
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
#plano_real[name="Línea 1"] { | |
line-color: #30a3dc; | |
} | |
#plano_real[name="Línea 2"] { | |
line-color: #cd031f; | |
} | |
#plano_real[name="Línea 3"] { | |
line-color: #ffe114; | |
} | |
#plano_real[name="Línea 4"] { |
OlderNewer