TLDR; didn't work
docker run --name travis-debug -dit travisci/ci-garnet:packer-1512502276-986baf0 /sbin/init
docker exec -it travis-debug bash -l
/** | |
* Debugging window.open function | |
* Overwrites the origin window.open function so that you can see the call stack | |
* And debug variables | |
* @see https://www.w3schools.com/Jsref/met_win_open.asp | |
*/ | |
window.open = function( URL, name, specs, replace ){ | |
console.group("Debugging the window.open function"); | |
console.log("URL : " + URL); | |
console.log("name : " + name); |
if( !is_admin() && class_exists('\DOMDocument' ) ){ | |
/** | |
* Checks if a gravity form has been submitted | |
* @return bool | |
*/ | |
function form_submitted(){ | |
return isset( $_POST['gform_submit'] ) && '1' === $_POST['gform_submit']; | |
} | |
"repositories": [ | |
{ | |
"type": "package", | |
"package": { | |
"name": "vendor-name/package-name", | |
"version": "dev-master", | |
"type": "library", | |
"source": { | |
"url": "https://gitlab.com/vendor-name/package-name.git", | |
"type": "git", |
echo "Installing WP-CLI..."; | |
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 | |
echo "Installing Composer..."; | |
sudo apt-get update; | |
sudo apt-get install curl php-cli php-mbstring git unzip -y; | |
cd ~; |
<?php | |
$ytURL = https://www.youtube.com/watch?v=dQw4w9WgXcQ; | |
echo wp_oembed_get( $ytURL ); |
for i in {1..20} | |
do | |
post_type="post"; | |
post_type_singular="Entrant"; | |
post_title="$post_type_singular $i"; | |
post_id=$(wp post create --post_author=admin --post_type=$post_type --post_status=publish --post_content="$post_title Content" --post_title="$post_title" --post_excerpt="$post_title Excerpt" --porcelain); | |
wp media import "https://picsum.photos/480/640/?random&$i.jpeg" --post_id=$post_id --title="Random Image for $post_title" --caption="$post_title Caption" --alt="$post_title Alternative Text" --desc="$post_title Desciption" --featured_image; | |
done |
### | |
# Creates 30 dummy posts with featured images via placeimg.com | |
### | |
POST_TYPE_SLUG=post; | |
POST_TYPE_SINGULAR_NAME=Post; | |
for i in {1..31} | |
do | |
echo "Creating $POST_TYPE_SINGULAR_NAME i = [$i]"; | |
post_id=$(wp post create --post_name="Entrant $i" --post_title="Entry $i" --post_type="$POST_TYPE_SLUG" --post_status=publish --post_author=1 --post_date="1987-10-$i 00:00:00" --porcelain --allow-root); | |
echo "post_id = [$post_id]"; |
function getAllCSS(element){ | |
if( !element instanceof HTMLElement ){ | |
console.warn("Select a valid HTML Element before proceeding"); | |
return ''; | |
} | |
let cssString = ''; | |
const cssObj = window.getComputedStyle(element); | |
let cssAttributes = []; |