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
| <?php | |
| // Add this to your child theme's function.php file. | |
| // Make sure you flush the rewrite rules. | |
| // On wp cli you can 'wp rewrite flush' | |
| // Or goto WordPress Admin > Settings > Permalink and save the settings which will flush the rules. | |
| add_filter( | |
| 'df_faq_post_type_args', function ($args) { | |
| $args['public'] = true; | |
| $args['exclude_from_search'] = false; |
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 { | |
| listen 80 default deferred; | |
| server_name laravel-application.com; | |
| # http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log | |
| access_log /var/www/laravel-app/access.log; | |
| error_log /var/www/laravel-app/error.log; | |
| root /var/www/laravel-app/public/; |
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
Show hidden characters
| { | |
| "autocomplete": true, | |
| "autoimport": true, | |
| "enable_auto_align": true, | |
| "engine": "fmt.phar", | |
| "format_on_save": true, | |
| "indent_with_space": 4, | |
| "options": | |
| [ | |
| "-n" |
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/bash | |
| # | |
| # What should we monitor | |
| # | |
| DNS=$1 | |
| DOMAIN=$2 | |
| KEYWORD=$3 | |
| OUTPUT=$(dig ${DNS} ${DOMAIN} +short 2>&1) | |
| # Enable this for testing if needed |
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
| # Matches any URL containing /wp-content/uploads/ | |
| location ~ "^(.*)/wp-content/uploads/(.*)$" { | |
| try_files $uri @prod_serv; | |
| } | |
| # Will redirect requests to your production server | |
| location @prod_serv { | |
| rewrite "^(.*)/wp-content/uploads/(.*)$" "https://production.com/wp-content/uploads/$2" redirect; | |
| } |
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/bash -e | |
| ### Copyright 1999-2015. Parallels IP Holdings GmbH. All Rights Reserved. | |
| ### Secure plesk clean installation with hostname certificate by Let's Encrypt | |
| export PYTHONWARNINGS="ignore:Non-standard path" | |
| LE_HOME=${LE_HOME:-"/usr/local/psa/var/modules/letsencrypt"} | |
| HOSTNAME=$(hostname) | |
| # Use staging server for testing | |
| # --server https://acme-staging.api.letsencrypt.org/directory |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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/bash | |
| # Idea and interface taken from https://github.com/macmade/host-manager | |
| path="/etc/hosts" | |
| addusage="Usage: `basename $0` -add host address" | |
| remusage="Usage: `basename $0` -remove host" | |
| case "$1" in | |
| -add) | |
| if [ $# -eq 3 ]; then | |
| if [[ -n $(grep "^$3.*[^A-Za-z0-9\.]$2$" ${path}) ]]; then |