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 | |
| echo -n "GitHub User: " | |
| USER="<username>" | |
| echo -n "GitHub Password: " | |
| PASS="<passowrd>" | |
| echo "" | |
| echo -n "GitHub Repo (e.g. foo/bar): " |
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 | |
| /** | |
| * Created by JetBrains PhpStorm. | |
| * User: Brice | |
| * Date: 6/23/13 | |
| * Time: 22:05 PM | |
| * To change this template use File | Settings | File Templates. | |
| */ | |
| $query = new EntityFieldQuery(); | |
| $query->entityCondition('entity_type', 'node'); |
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 | |
| /** | |
| * Created by PhpStorm. | |
| * Migrate taxonomy terms with heiarchy for open calls | |
| * User: brice | |
| * Date: 9/21/15 | |
| * Time: 3:04 PM | |
| */ | |
| // drush @sh scr sites/all/modules/idealist/drush/open-calls-import.php --src='csv/calls.csv' |
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
| npm install -g yo mocha generator-shoov | |
| brew install graphicsmagick |
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
| rsync -azvr --delete-after ../productivity/productivity profiles/ | |
| rsync -azvr --delete-after ../productivity/www/app/ app/ |
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 MimeMailSystem__SmtpMailSystem implements MailSystemInterface { | |
| protected $formatClass; | |
| protected $mailClass; | |
| public function __construct() { | |
| if (drupal_autoload_class('MimeMailSystem')) { | |
| $this->formatClass = new MimeMailSystem; | |
| } | |
| else { | |
| $this->formatClass = new DefaultMailSystem; |
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 @cri.dev vset image_allow_insecure_derivatives 1 --strict=0 | |
| drush @cri.dev vset image_allow_insecure_derivatives 0 --strict=0 |
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
| $query = db_select('field_data_name_field', 'nf'); | |
| $query->join('taxonomy_term_hierarchy', 'tth', 'tth.tid = nf.tid'); | |
| $query->addField('nf', 'name_field_value', 'name'); | |
| $query->addField('nf', 'entity_id', 'tid'); | |
| $query | |
| ->condition('entity_type', 'taxonomy_term') | |
| ->condition('bundle', $bundle) | |
| ->condition('name', db_like($prefix) . '%', 'LIKE') | |
| ->range(0, 10) |
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
| // Find the designer node. | |
| $conditions = array( | |
| 'title_field' => array('type' => 'field', 'value' => $row->designer_heb), | |
| ); | |
| if ($designer_nid = $this->createNode('designer', $conditions, $values)) { | |
| $wrapper->field_designer->set($designer_nid); | |
| } | |
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
| $query | |
| ->entityCondition('entity_type', 'node') | |
| ->range(0,1) | |
| ->propertyOrderBy('updated', DESC); | |
| $result = $query->execute(); | |
| if (empty($result['node'])) { | |
| return time("10.10.2014"); | |
| } | |