drush sql-dump --structure-tables-list=cache,cache_*,watchdog --gzip --result-file=/abs/path/to/dump.sql
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
# docker-compose.yml - creates a new network bridge | |
# listed in `docker network ls`. | |
# Note the name, i.e: `br-f60327d77bc2` | |
services: | |
tomcat: | |
image: tomcat:7.0 | |
networks: | |
- dockernet | |
networks: |
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
01 08,20 * * * /bin/certbot renew --webroot --webroot-path /var/www/html/letsencrypt --post-hook "systemctl reload httpd" |
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
Operating System: CentOS 7 | |
These are the steps to follow when sending email from command line using SSL, for example: | |
echo "" | /bin/mail -v -q -s "subject" -r [email protected] -S smtp-auth=login -S smtp=smtps://secure.emailsrvr.com:465 -S smtp-auth-user="[email protected]" -S smtp-auth-password="SECRET" [email protected] | |
Steps: | |
1. Fix the Missing "nss-config-dir" variable error | |
2. Pull the certificate chain using openss s_client -showcerts command |
/usr/sbin/tripwire --update --twrfile /var/lib/tripwire/report/<name>.twr
/usr/sbin/tripwire --test --email [email protected]
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
server { | |
server_name example.com; | |
listen 80; | |
# Exception rule for certbot renewal | |
location ^~ /.well-known/acme-challenge/ { | |
default_type "text/plain"; | |
root /usr/share/nginx/html/letsencrypt; | |
try_files $uri $uri/ =404; | |
break; |
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/env bash | |
php core/scripts/run-tests.sh --sqlite /path/to/RAMDISK/drupal.sqlite --color --concurrency 8 --all |
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
# Database | |
$databases['default']['default'] = array ( | |
'database' => 'TODO_DB', | |
'username' => 'TODO_DB_USER', | |
'password' => 'TODO_DB_PASS', | |
'prefix' => '', | |
'host' => 'TODO_DB_HOST', | |
'port' => '3306', | |
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', | |
'driver' => 'mysql', |
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
SITE="https://www.website.com" | |
USER="[email protected]" | |
PASS="password" | |
# Log in and save session cookies to cookies.txt | |
curl -c ./cookies.txt -L -X POST $SITE/user/login -d "name=$USER&pass=$PASS&form_id=user_login_form&op=Log In" | |
# Make authenticated requests | |
curl -b cookie.txt -X GET $SITE/admin/config/development/performance |
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
# Sync only images | |
rsync -ravz --progress --include="*/" --include="*/*.jpg" --include="*/*.jpeg" --include="*/*.png" --include="*/*.gif" --include="*/*.svg" --exclude="*" [email protected]:/path/to/folder/ . |