This file contains 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 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 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 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 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 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 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 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 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
docker inspect --format='{{ .State.Running }}' <container_name> |
This file contains 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
netstat -ln | grep LISTEN | grep -o ':<portnum> ' | awk {'print substr($0,2)'} |