This was tested on:
- Ubuntu 14.04 x64
- Ubuntu 16.04 x64
#!/bin/bash | |
apt-get install automysqlbackup | |
apt-get install s3cmd | |
s3cmd --configure | |
s3cmd sync --recursive --delete-removed /var/lib/automysqlbackup/ s3://bucket/mysql/ | |
s3cmd sync --exclude-from=/root/s3cmd.exclude --recursive --delete-removed /sites s3://bucket/sites/daily/`echo $(date +"%F")`/ | |
find /var/lib/automysqlbackup/ -name *.sql.gz -mtime +7 -exec rm {} \; |
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb | |
sudo apt-get update | |
sudo apt-get install wkhtmltox | |
sudo apt-get -f install | |
sudo dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb | |
wkhtmltopdf -V | |
rm wkhtmltox-0.12.2.1_linux-trusty-amd64.deb |
Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.
As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.
Warning
These guidelines haven't been updated since 2016. Learn more…
Table of contents
.text-xs-left { text-align: left; } | |
.text-xs-right { text-align: right; } | |
.text-xs-center { text-align: center; } | |
.text-xs-justify { text-align: justify; } | |
@media (min-width: @screen-sm-min) { | |
.text-sm-left { text-align: left; } | |
.text-sm-right { text-align: right; } | |
.text-sm-center { text-align: center; } | |
.text-sm-justify { text-align: justify; } |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
service exim stop | |
chkconfig exim off | |
touch /etc/eximdisable (or create an empty file in /etc with the filename 'eximdisable') |
<?php | |
add_action('wp_dashboard_setup', 'remove_dashboard_widgets'); | |
if( !function_exists('remove_dashboard_widgets') ) : | |
/** | |
* | |
*/ | |
function remove_dashboard_widgets() { | |
remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // Incoming Links | |
remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // Plugins |
<?php | |
$view = new View($this, false); | |
$view->set(compact('some', 'vars')); | |
$html = $view->render('view_name'); |