git discard all local changes/commits and pull from upstream
git reset --hard origin/master
git pull origin master
| service exim stop | |
| chkconfig exim off | |
| touch /etc/eximdisable (or create an empty file in /etc with the filename 'eximdisable') |
| #!/bin/bash | |
| # Run this inside your cPanel account or just in public_html drupal web root | |
| # Find the ico malware | |
| find . -type f -name "favicon_*.ico" | |
| find . -type f -name ".*.ico" | |
| # Delete the malware, I did not delete favicon_*.ico as you need to double check it manually | |
| find . -type f -name ".*.ico" -exec rm -f {} \; |
| #!/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 |
| <?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'); |
| <?php | |
| // overall test answer | |
| $was_called = false; | |
| $this->app->resolving(function ($object, $app) use (&$was_called) { | |
| if ($object instanceof MyEventListener) { | |
| // the object was resolved at one point | |
| $was_called = true; | |
| } |
git discard all local changes/commits and pull from upstream
git reset --hard origin/master
git pull origin master
| # | |
| # Create this file in the following folder docker/mysql/docker-entrypoint-initdb.d | |
| # | |
| CREATE DATABASE IF NOT EXISTS `test_1` COLLATE 'utf8_general_ci' ; | |
| GRANT ALL ON `test_1`.* TO 'root'@'%' ; | |
| CREATE DATABASE IF NOT EXISTS `test_2` COLLATE 'utf8_general_ci' ; | |
| GRANT ALL ON `test_2`.* TO 'root'@'%' ; |
Your Service Worker script will need to import in Workbox and initialize it before calling any of the routes documented in this write-up, similar to the below:
importScripts('workbox-sw.prod.v1.3.0.js');
const workbox = new WorkboxSW();
// Placeholder array populated automatically by workboxBuild.injectManifest()