This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)
Sister Document - Restore MySQL from Amazon S3 - read that next
this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc
<?php | |
use Drupal\Core\Database\Database; | |
use Drupal\Core\Database\Query\Condition; | |
use Drupal\image\Entity\ImageStyle; | |
use Drupal\file\Entity\File; | |
/** | |
* ================================================================ | |
* Implements hook_drush_command(). | |
* ---------------------------------------------------------------- |
for t in $(drush sqlq "show tables"); do echo $(drush sqlq "SELECT '$t' n, COUNT(*) r FROM $t") ; done |
# Add MS code to path https://code.visualstudio.com/docs/setup/mac | |
cat << EOF >> ~/.zshrc | |
# Add Visual Studio Code (code) | |
export PATH="/Applications/Visual Studio Code.app/Contents/Resources/app/bin:$PATH" | |
EOF | |
================== | |
# Add Sublime text to path https://code.visualstudio.com/docs/setup/mac | |
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime |
<?php | |
/** | |
* Theme_menu_tree doesn't provide any context information | |
* THIS SUCKS | |
* But you can use hook_block_view_alter to change the theme wrapper | |
* OUF! | |
*/ | |
function MYTHEME_menu_tree(&$variables) { |
function themename_menu_link(&$variables) { | |
$element = $variables['element']; | |
$sub_menu = ''; | |
$element['#attributes']['data-menu-parent'] = $element['#original_link']['menu_name'] . '-' . $element['#original_link']['depth']; | |
if ($element['#below']) { | |
$sub_menu = drupal_render($element['#below']); | |
} |
{ | |
"bold_folder_labels": true, | |
"caret_extra_width": 1, | |
"caret_style": "phase", | |
"close_windows_when_empty": false, | |
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme", | |
"draw_minimap_border": true, | |
"enable_tab_scrolling": false, | |
"font_face": "Inconsolata", | |
"font_options": |
# install missing libraries (if any) | |
[root@sm ~]# cd ~ | |
[root@sm ~]# sudo yum update | |
# get and unpack elasticsearch tar file | |
[root@sm ~]# wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.1.tar.gz -O elasticsearch.tar.gz | |
[root@sm ~]# tar -xvf elasticsearch.tar.gz | |
[root@sm ~]# mv elasticsearch-* elasticsearch | |
[root@sm ~]# sudo mv elasticsearch /usr/local/share |