View piccia.css
This file contains 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
.gf_progressbar { | |
margin-left: -40px; | |
} | |
.gf_progressbar .gf_progressbar_percentage > span { | |
position: absolute; | |
left: -40px; | |
top: -2px; | |
} |
View remove-woo-scripts.php
This file contains 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
/** | |
* This code snippet removes JavaScript and CSS files loaded from WooCommerce if they are not necessary. | |
* | |
* Please test this on a staging copy of your website before putting this into the functions.php of your live website. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'my_remove_woo_assets', 99 ); | |
function my_remove_woo_assets() { | |
if ( function_exists( 'is_woocommerce' ) ) { // Check if Woo is installed. | |
if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) { // Only run on non-Woo pages. | |
// Remove unnecessary stylesheets. |
View Jenkinsfile
This file contains 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
pipeline { | |
agent any | |
tools { | |
ant 'ant' | |
} | |
// Pull the repo first. | |
stages { | |
stage( 'Checkout Repo' ) { |
View phploy.ini
This file contains 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
; This is a sample phploy.ini file. You can specify as many | |
; servers as you need and use normal or quickmode configuration. | |
; | |
; NOTE: If a value in the .ini file contains any non-alphanumeric | |
; characters it needs to be enclosed in double-quotes ("). | |
; The server names in the brackets need to match the server names | |
; you reference in your Jenkinsfile. | |
[production] |
View commands.sh
This file contains 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
// Install PHPloy in your project | |
composer require "banago/phploy" | |
// Initialize PHPloy in the project folder | |
phploy --init |
View Commands for Module 3
This file contains 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
// First add the repository key to the system. | |
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - | |
// Append the Debian repository to your server's sources.list | |
sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' | |
// Update your package index | |
apt update | |
// Run an upgrade |
View Jenkinsfile
This file contains 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
pipeline { | |
agent any | |
// Pull the repo first. | |
stages { | |
stage( 'Checkout Repo' ) { | |
steps { | |
checkout scm | |
} | |
} | |
stage( 'Deploy' ) { |
View docker-compose.yml
This file contains 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
version: '3.2' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: on-failure | |
environment: | |
# Grab this data from wp-config.php | |
# TODO: Update DB_HOST in wp-config.php to "db:port" |
View export_database_with_replace.sh
This file contains 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 | |
CONTAINER=$1 | |
SEARCH=$2 | |
REPLACE=$3 | |
# Dump the file | |
DUMP=$(docker exec $CONTAINER wp db export --add-drop-table --porcelain) |
View git-create-repo.sh
This file contains 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/bash | |
NAME=$1 | |
TYPE=$2 | |
echo "Creating the repository" | |
gh re --browser false --new "$NAME" --type "$TYPE" | |
mkdir "$NAME" | |
cd "$NAME" |
NewerOlder