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
const path = require('path'); | |
const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); | |
// see: https://stackoverflow.com/a/28989476 | |
var webpack = require("webpack"); | |
console.log("the __dirname is: " + __dirname); | |
module.exports = { | |
mode: "production", |
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 | |
/** | |
* Replace img tag with amp-img | |
* | |
* <amp-img src="[src]" | |
* width="[width]" | |
* height="[height]" | |
* layout="responsive" | |
* alt="[alt]"> | |
* </amp-img> |
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
$body = preg_replace( '/<iframe\b[^>]*soundcloud.com\/tracks\/(\d*).*"[^>]*>(.*?)>/', '<amp-soundcloud height=300 layout="fixed-height" data-trackid="$1" data-visual="true"></amp-soundcloud>', $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
#chevron-arrow { | |
display: inline-block; | |
border-right: 4px solid black; | |
border-bottom: 4px solid black; | |
width: 10px; height: 10px; | |
transform: rotate(-45deg); | |
} |
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
(function() { | |
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | |
dsq.src = 'http://disqus.com/embed.js'; | |
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); | |
})(); |
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
$arr = array(... your multi dimension array here ...); | |
foreach($arr as $idx => $row) { | |
if (preg_grep('/^$/', $row)) { | |
unset($arr[$idx]); | |
} | |
} |