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 | |
// Original Source: https://github.com/bpolaszek/webpack-encore-resolver | |
// ... but as a single file to include in your application | |
namespace Namespace; \\ replace with your namespace | |
final class EncoreAssetPathResolver | |
{ | |
/** | |
* @var string |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<title>Bootstrap flyout demo</title> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"> | |
<link href="flyout.css" rel="stylesheet"> | |
</head> | |
<body> |
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
FROM php:7.3-fpm | |
# install git | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends git | |
#install some base extensions | |
RUN apt-get install -y \ | |
g++ \ | |
git \ |
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
/** | |
* | |
* @param $url | |
* @return bool|string | |
*/ | |
function extvideo_embed_code($url) { | |
if(filter_var($url, FILTER_VALIDATE_URL)) { | |
$parsed = parse_url($url); | |
if (in_array($parsed["host"], ["youtube.com", "www.youtube.com", "youtu.be"])) { | |
if (preg_match('/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/', $url, $matches)) { |