Generate an Docker image with Node and Create React App installed. For this edit a file called Dockerfile with the following content:
FROM node:6-alpine
# Install create-react-app
RUN npm install -g create-react-app
WORKDIR /src
CMD [ "node" ]
Generate an Docker image with Node and Create React App installed. For this edit a file called Dockerfile with the following content:
FROM node:6-alpine
# Install create-react-app
RUN npm install -g create-react-app
WORKDIR /src
CMD [ "node" ]
| #!/bin/bash | |
| # | |
| # Get path to this script: | |
| # http://stackoverflow.com/questions/4774054/reliable-way-for-a-bash-script-to-get-the-full-path-to-itself | |
| # | |
| pushd `dirname $0` > /dev/null | |
| SCRIPT_PATH=`pwd -P` | |
| ROOTFS=`dirname "$SCRIPT_PATH"` | |
| popd > /dev/null |
| ## Here's the way to have Nginx return a robots.txt file that disallows all crawling by bots. | |
| ## This is useful for development and private sites. | |
| location = /robots.txt { | |
| add_header Content-Type text/plain; | |
| return 200 "User-agent: *\nDisallow: /\n"; | |
| } |
| ; | |
| ; These come from: | |
| ; https://github.com/pret/pokered/blob/master/home.asm | |
| ; | |
| ; ---------------------------------------------------------------------------------------- | |
| ; Disable LCD | |
| ; ---------------------------------------------------------------------------------------- | |
| DisableLCD:: | |
| xor a |
| -- | |
| -- Source: https://wiki-bsse.ethz.ch/display/ITDOC/Check+size+of+tables+and+objects+in+PostgreSQL+database | |
| -- | |
| SELECT | |
| relname as "Table", | |
| pg_size_pretty(pg_total_relation_size(relid)) As "Size", | |
| pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size" | |
| FROM | |
| pg_catalog.pg_statio_user_tables | |
| ORDER BY |
| <?php | |
| /** | |
| * Implements hook_cement_publish_page() | |
| */ | |
| function site_home_cement_publish_page($pid, $rev) { | |
| // Hacer un clear cache de home y vivo del cache de paginas | |
| $domains = variable_get('varnish_front_domains', 'desa.eldoce.tv eldoce.tv'); | |
| foreach(explode(' ', $domains) as $domain) { |
This will enable an additional view mode for use on the specified entity type(s). Many examples will show the custom settings here being set to TRUE. If TRUE is used then that view mode is added to all entities of the specified type regardless of if it should be on the bundle or not.
/**
* Implements hook_entity_info_alter().
*/
function HOOK_entity_info_alter(&$entity_info) {| <?php | |
| // Query and loop over results | |
| $result = db_select('node', 'n') | |
| ->fields('n', array('nid')) | |
| ->condition('type', 'article') | |
| ->condition('uid', array(0,1), 'IN') | |
| ->execute(); | |
| foreach($result as $row) { |
| #!/bin/bash | |
| # --------------------------------------------------------------------------------------- | |
| # Configuration options | |
| # --------------------------------------------------------------------------------------- | |
| DEFAULT_ADMIN_THEME='adminimal' # Other common options: seven - adaptivetheme_admin | |
| DEFAULT_THEME='bartik' # Other common options: omega - zen - bartik | |
| ADMIN_PASSWORD='<strong-password>' | |
En Drupal 7 se 'mergearon' los usuarios, nodos y taxonomías en una entidad. Las entidades pueden tener campos adicionales a los que ya tenían. Adicionalmente, cada campo puede estar traducido y, por lo tanto, tener distintos valores dependiendo del idioma. En general es mejor acceder a los valores de los campos via APIs en lugar de acceder directamente al campo. Listamos algunas de las funciones más útiles y recomendadas para utilizar: