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
| #!/usr/bin/env bash | |
| # | |
| # Scan a WordPress uploads directory for suspicious files / code. | |
| # | |
| # Usage: | |
| # bash scan_wp_uploads.sh /path/to/wp-content/uploads | |
| # # or if run from WP root: | |
| # bash scan_wp_uploads.sh wp-content/uploads | |
| # |
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
| #!/usr/bin/env bash | |
| # | |
| # Scan a WordPress theme (or themes directory) for suspicious code. | |
| # | |
| # Usage examples: | |
| # # from WP root, scan ALL themes: | |
| # bash scan_wp_theme.sh wp-content/themes | |
| # | |
| # # scan a specific theme: | |
| # bash scan_wp_theme.sh wp-content/themes/twentytwentyfive |
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
| #!/usr/bin/env bash | |
| # | |
| # Scan a WordPress database for suspicious content. | |
| # | |
| # Usage (from WP root): | |
| # bash scan_wp_db.sh | |
| # | |
| # Or specify a path to the WP root: | |
| # bash scan_wp_db.sh /var/www/html | |
| # |
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
| stages: | |
| - deploy | |
| Deploy: | |
| before_script: | |
| ## Install ssh-agent if not already installed, it is required by Docker. | |
| ## (change apt-get to yum if you use an RPM-based image) | |
| - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' | |
| ## Create the SSH directory and give it the right permissions |
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
| if ( defined( 'WP_CLI' ) && WP_CLI ) { | |
| class Woo_Subs_Cli extends WP_CLI_Command { | |
| public function update_sub_pricing( $args ){ | |
| // Quick check to make sure all the require args are available | |
| if( count( $args ) != 2 && is_numeric( $args[1] ) && floor( $args[1] ) != $args[1] ){ | |
| WP_CLI::line( 'Please provide 1 subscription ID and new price in this format:' ); | |
| WP_CLI::line( 'woosubscriptions update_sub_pricing 1111 30' ); |
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
| echo "-> Getting rid of local SQL file" | |
| mkdir data | |
| rm -rf data/development.sql | |
| touch data/development.sql | |
| echo "-> Booting Docker" | |
| docker-compose up --build -d | |
| echo "-> Removing vendor folder" | |
| rm -rf vendor | |
| echo "-> Updating composer" | |
| docker-compose exec php composer update |
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
| // Check that required variables exist | |
| if( ( process.argv[2] == undefined ) || ( process.argv[3] == undefined ) ){ | |
| console.log('Missing variables') | |
| console.log('1, local path to coverage file. 2, url to target css file') | |
| return; | |
| } | |
| (async () => { | |
| var fs = require("fs"); |
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
| $(".header .user__menu a[href*='/students/sign_out']").on({ | |
| 'click' : function(e) { | |
| e.preventDefault(); | |
| $.ajax({ | |
| type: "POST", | |
| url: "https://app.examfit.co.uk/students/sign_out", | |
| crossDomain: true, | |
| success: function( data, textStatus, jQxhr ){ | |
| alert('hi'); | |
| } |
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
| function gdpr_fields( $subscription_data ) { | |
| $subscription_data['marketing_permissions'][0]['marketing_permission_id'] = '45e116b06'; | |
| $subscription_data['marketing_permissions'][0]['enabled'] = true; | |
| $subscription_data['marketing_permissions'][1]['marketing_permission_id'] = '188d4ee19'; | |
| $subscription_data['marketing_permissions'][1]['enabled'] = false; | |
| $subscription_data['marketing_permissions'][2]['marketing_permission_id'] = '2af3be3ab'; | |
| $subscription_data['marketing_permissions'][2]['enabled'] = true; | |
| return $subscription_data; |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> | |
| <title>Bootstrap</title> |
NewerOlder