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/sh | |
| ENVPATH=/var/www/sites/example.com | |
| git --work-tree=$ENVPATH/public/ checkout -f | |
| rm $ENVPATH/public/build.* |
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
| git branch -rd remote/branch |
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
| git symbolic-ref HEAD refs/heads/mybranch |
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 = $call_args['query']; | |
| if(!strlen($query)) return; | |
| $q = strtolower($query); | |
| $qArray = explode(" ", trim($q, ' "') ); | |
| $segments = 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
| reload schema and query-side synonyms without restarting solr | |
| http://www.example.com/solr/admin/cores?action=RELOAD&core=mycore |
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 | |
| $entity = node_load(33); | |
| echo "on load: {$entity->field_test1[LANGUAGE_NONE][0]['value']}<br/>"; | |
| $entity->field_test1[LANGUAGE_NONE][0]['value']='test'.rand(10,100); | |
| echo "before save: {$entity->field_test1[LANGUAGE_NONE][0]['value']}<br/>"; | |
| $entity2=new stdClass; | |
| $entity2->nid=$entity->nid; | |
| $entity2->vid=$entity->vid; |
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
| mysql -uroot -p -e "CREATE DATABASE mysite" | |
| drush dl drupal-7.x | |
| mv local.mysite.dev | |
| cd local.mysite.dev | |
| drush site-install standard --account-name=admin --account-pass=admin --db-url=mysql://YourMySQLUser:RandomPassword@localhost/mysite |
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
| sudo mysql_secure_installation |
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
| diff --git a/superfish.module b/superfish.module | |
| index f994eaa..d884ed2 100644 | |
| --- a/superfish.module | |
| +++ b/superfish.module | |
| @@ -1753,6 +1753,18 @@ function theme_superfish($variables) { | |
| $menu = i18n_menu_localize_tree($menu); | |
| } | |
| + if(module_exists('og')) | |
| + { |
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
| try | |
| { | |
| } | |
| catch(EntityMetadataWrapperException $exc) | |
| { | |
| watchdog( | |
| 'MODULE_NAME', | |
| 'See ' . __FUNCTION__ . '() <pre>' . $exc->getTraceAsString() . '</pre>', | |
| NULL, WATCHDOG_ERROR |