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
| {% for i in row.cells|keys -%} | |
| {% if row.cells[i].is_header %} | |
| <th{{ row.cells[i].attributes }}> | |
| {{- row.cells[i].data -}} | |
| </th> | |
| {% else %} | |
| <td{{ row.cells[i].attributes }}> | |
| {{- row.cells[i].data -}} | |
| </td> | |
| {% endif %} |
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
| alias dreset='cd `drush dd` && drush sql-drop -y && sudo rm -rf sites/default/files sites/default/settings.php && mkdir sites/default/files && cp sites/default/default.settings.php sites/default/settings.php && chmod -R 777 sites/default/files sites/default/settings.php' |
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 | |
| // A discourse on l() and #theme:link | |
| // The l() function is just a helper to make links easier for developers to | |
| // write. Think of them more as being relevant to translatables, descriptive | |
| // text, and inline links. | |
| return array( | |
| '#theme' => 'example_one', | |
| '#description' => t('Some descriptive text and a !link', 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
| /** | |
| * Old houndstooth | |
| */ | |
| body { | |
| background: | |
| linear-gradient(-45deg, white 25%, transparent 25%, transparent 75%, black 75%, black) 0 0, | |
| linear-gradient(-45deg, black 25%, transparent 25%, transparent 75%, white 75%, white) 1em 1em, | |
| linear-gradient(45deg, black 17%, transparent 17%, transparent 25%, black 25%, black 36%, transparent 36%, transparent 64%, black 64%, black 75%, transparent 75%, transparent 83%, black 83%) 1em 1em; | |
| background-color: white; |
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
| /** | |
| * New, correct houndstooth | |
| */ | |
| body { | |
| background:linear-gradient(-45deg, transparent 25%, transparent 25%, transparent 75%, white 75%, white) 0 0, | |
| linear-gradient(-45deg, white 25%, transparent 25%, transparent 75%, transparent 75%, transparent) 2em 2em, | |
| linear-gradient(45deg, transparent 87.5%, white 87.5%), | |
| linear-gradient(45deg, transparent 0, transparent 12.5%, white 12.5%, white 25%, transparent 25%) 2em 2em, | |
| linear-gradient(45deg, white 12.5%, transparent 12.5%), |
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
| /** | |
| * New houndstooth | |
| */ | |
| body { | |
| background: | |
| linear-gradient(-45deg, white 25%, transparent 25%, transparent 75%, black 75%, black) 0 0, | |
| linear-gradient(-45deg, black 25%, transparent 25%, transparent 75%, white 75%, white) 2em 2em, | |
| linear-gradient(45deg, black 12.5%, transparent 12.5%, transparent 25%, black 25%, black 37.5%, transparent 37.5%, transparent 62.5%, black 62.5%, black 75%, transparent 75%, transparent 87.5%, black 87.5%) 2em 2em; | |
| background-color: white; |
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 | |
| $node = menu_get_object(); | |
| if (!empty($node->some_field[$node->language][0]['nid'])) { | |
| $org = node_load($node->some_field[$node->language][0]['nid']); | |
| $build = node_view($org, 'full'); | |
| } | |
| else { | |
| $build = 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 | |
| /** | |
| * Extension of DateTime to accommodate default timezone. | |
| */ | |
| class LocalDateTime extends DateTime { | |
| public function __construct($time = "now", $timezone = NULL) { | |
| if (!isset($timezone)) { | |
| parent::__construct($time); | |
| $this->setTimeZone(LocalDateTime::getDefaultTimeZone()); |
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 A wonderful fairy tale in which PagerDefault and SearchQuery slow-dance | |
| * to the same song. | |
| */ | |
| /** | |
| * Provide support for paging and searching. Most of this code is copied from | |
| * class PagerDefault (in ./includes/pager.inc) and class SearchQuery (in |
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 | |
| define('ALPHA', 'abcdefghijklmnopqrstuvwxyz'); | |
| $pow = $sum = 0; | |
| foreach (array_reverse(str_split(trim(file_get_contents('php://stdin', 'r')))) as $char) { | |
| $sum += pow(strlen(ALPHA), $pow++) * (strpos(ALPHA, strtolower($char)) + 1); | |
| } |