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 | |
| drush sql-dump --gzip --result-file=backup-xxxx.sql.gz --structure-tables-list=cache,cache_*,cache_filter,cache_form,cache_menu,cache_page,history,sessions,watchdog |
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 | |
| // Varnish | |
| $conf['cache_backends'][] = 'sites/all/modules/contrib/varnish/varnish.cache.inc'; | |
| $conf['cache_class_cache_page'] = 'VarnishCache'; | |
| // Drupal 7 does not cache pages when we invoke hooks during bootstrap. This needs | |
| // to be disabled. | |
| $conf['page_cache_invoke_hooks'] = FALSE; | |
| $conf['reverse_proxy'] = TRUE; |
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 | |
| /** | |
| * @file | |
| * Default simple view template to display a list of rows. | |
| * | |
| * @ingroup views_templates | |
| */ | |
| ?> | |
| <?php if (!empty($title)): ?> |
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 | |
| class HotelMigration extends Migration { | |
| public function __construct(array $arguments) { | |
| parent::__construct($arguments); | |
| $this->description = t('Import of hotels'); | |
| $columns = array( | |
| 0 => array('StreetId', 'StreetId'), |
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 | |
| $field_name = 'field_name'; | |
| $field = field_read_field($field_name); | |
| $field['locked'] = 0; // 0: unlock; 1: lock. | |
| field_update_field($field); |
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
| // Usage: @include transparent(#000, 0.6); | |
| @mixin transparent($color, $alpha) { | |
| $rgba: rgba($color, $alpha); | |
| $ie-hex-str: ie-hex-str($rgba); | |
| background-color: transparent; | |
| background-color: $rgba; | |
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$ie-hex-str}, endColorstr=#{$ie-hex-str}); | |
| zoom: 1; | |
| } |
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
| /* | |
| * See: http://www.oliverdavies.co.uk/blog/include-css-fonts-using-sass-each-loop | |
| * Usage: font-family: "FuturaBook"; | |
| */ | |
| @each $family in FuturaBook, FuturaBold, FuturaBoldItalic, FuturaItalic { | |
| @font-face { | |
| font-family: #{$family}; | |
| src: url('../fonts/#{$family}/#{$family}.eot'); | |
| src: url('../fonts/#{$family}/#{$family}.eot?#iefix') format('embedded-opentype'), | |
| url('../fonts/#{$family}/#{$family}.woff') format('woff'), |
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
| (function ($) { | |
| Drupal.behaviors.accordion = { | |
| attach: function (context, settings) { | |
| $('.accordion h3.title').once('accordion', function () { | |
| $('.accordion h3.title').toggle(function () { | |
| // Actions here | |
| }, function () { | |
| // Actions here | |
| }); | |
| }); |
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 site-install standard --db-url='mysql://[db_user]:[db_pass]@localhost/[db_name]' --site-name=Example --sites-subdir=example.com --account-name=admin --account-pass=password --account-mail=mail@example.com |