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
DROP PROCEDURE IF EXISTS migrateById; | |
DELIMITER $$ | |
CREATE PROCEDURE migrateById() | |
BEGIN | |
DECLARE done INT DEFAULT FALSE; | |
DECLARE _post_id INT; | |
DECLARE migrate_ids CURSOR FOR | |
# modify the select statement to returns IDs, which will be assigned the variable `_post_id` |
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
EXCLUDED_IDS = [ | |
1234567890 | |
] | |
DISCOUNT_CODE = "DISCOUNT_CODE" | |
DISCOUNT_PERCENTAGE = 0.70 | |
discount = Input.cart.discount_code | |
if discount and discount.code == DISCOUNT_CODE | |
Input.cart.line_items.each do |line_item| |
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
DROP PROCEDURE IF EXISTS STEPBYSTEP; | |
DELIMITER ;; | |
CREATE PROCEDURE STEPBYSTEP() | |
BEGIN | |
DECLARE done INT DEFAULT FALSE; | |
DECLARE POST_ID INT DEFAULT 0; | |
DECLARE cursor_results CURSOR FOR SELECT ID FROM wp_posts WHERE post_type = 'press_materials'; | |
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE; | |
OPEN cursor_results; |
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 | |
#################################################################### | |
## This prepare script is usually for finishing a release or hotfix. | |
## | |
## Assumptions: the hotfix/release branch has already been created. | |
## To start the hotfix/release, run with -s=yes | |
## | |
## From the hotfix/v0.0.0 or release/v0.0.0 branch, this script: | |
## - Updates the Changelog (automatically with commit messages) |
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
{% if video_url != blank %} | |
{% include 'video', | |
class: 'about__background__video', | |
url: video_embed, | |
loader: false | |
%} | |
{% endif %} |
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 | |
rm -rf * | |
git reset --hard HEAD |
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
<?php | |
class GFDonorPerfectAddon extends GFFeedAddOn { | |
public function init() { | |
parent::init(); | |
add_action( 'gform_post_payment_action', array( $this, 'post_payment_action_hook' ), 10, 2 ); | |
} | |
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 | |
adduser() | |
{ | |
if [ -z "$1" ] # Is parameter #1 zero length? | |
then | |
echo "-Parameters are zero length.-" # Or no parameter passed. | |
else | |
echo "-Parameter #1 is \"$1\".-" | |
fi |
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 | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
php wp-cli.phar --info | |
chmod +x wp-cli.phar | |
sudo mv wp-cli.phar /usr/local/bin/wp | |
wp --info |
NewerOlder