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
| <?php | |
| $ytURL = https://www.youtube.com/watch?v=dQw4w9WgXcQ; | |
| echo wp_oembed_get( $ytURL ); |
| 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 ~; |
| "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", |
| 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']; | |
| } | |
| /** | |
| * 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); |
| URL=www.google.com | |
| curl -sILk $URL; |
| ### | |
| # References https://craigiswayne.wordpress.com/2018/01/20/my-media-centre/ | |
| ### | |
| #### | |
| # Variables | |
| #### | |
| PI_IP=192.168.8.112; | |
| PI_USERNAME=osmc; |
| # Find all do_action's and add_action's | |
| grep -En "(add|do)_action\(" . -R --context=2 --include="*.php" | |
| # Find all apply_filter's and add_filter's | |
| grep -En "(apply|add)_filters?\(" . -R --context=2 --include="*.php" |