Skip to content

Instantly share code, notes, and snippets.

$reviews = "";// some array
$jsonData = json_encode($reviews, JSON_PRETTY_PRINT);
echo "<script>console.log('Reviews Data:', " . $jsonData . ");</script>";
function debug_to_console($data) {
$output = $data;
if (is_array($output))
$output = implode(',', $output);
echo "<script>console.log('Debug Objects: " . $output . "' );</script>";
}
// Then you can use it like this:
<div class="map-responsive" style="overflow:hidden; padding-bottom:56.25%; position:relative; height:0;">
<iframe src="xxx" width="600" height="450" frameborder="0" style="border:0; left:0; top:0; height:100%; width:100%; position:absolute;" frameborder="0" allowfullscreen="allowfullscreen" allow="accelerometer;" allowfullscreen="" loading="lazy"></iframe>
</div>
#Instructions
1. Warning: ONLY SAVE THIS FILE IN THE directory you want to use it in.
2. Save file name as nospaces.bat
3. Copy code into that file
4. Double click file. Voila.
5. Found it here. There are configuration options. You set them up
BEFORE you double click. This is not a GUI.
https://stackoverflow.com/questions/11270453/how-to-remove-spaces-from-file-names-in-bulk
<?xml version="1.0" encoding="UTF-8"?>
<FileZilla3 version="3.44.2" platform="windows">
<Filters>
<Filter>
<Name>Exclude Filetypes</Name>
<ApplyToFiles>1</ApplyToFiles>
<ApplyToDirs>0</ApplyToDirs>
<MatchType>All</MatchType>
<MatchCase>0</MatchCase>
<Conditions>
@uglyeoin
uglyeoin / responsive_youtube_inline
Last active November 8, 2021 17:08 — forked from sobstel/responsive_youtube.css
Inline Responsive embedded youtube video
<div style="position: relative; padding-bottom: 56.25%; padding-top: 25px; height: 0;">
<!-- Copy & Pasted from YouTube you need to add in the style elements, or simply replace the video URL only -->
<!-- style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" -->
<iframe style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" width="100%" height="315" src="https://www.youtube.com/watch?v=vpbMiohTWwM" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
@mixin vertical-align($position: relative) {
position: $position;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: perspective(1px) translateY(-50%);
}
/* Example Usage
<!-- Custom Fonts -->
<!--[if !mso]><!-- -->
<link href="https://fonts.googleapis.com/css?family=Raleway:400,500i,700,800" rel="stylesheet">
<!--<![endif]-->
<!-- End Custom Fonts -->
table {
border-spacing: 0;
table-layout: fixed;
overflow: hidden;
@uglyeoin
uglyeoin / background image for HTML email.html
Last active November 8, 2021 17:06
Background Image with Outlook support in HTML Email
<!-- Full width background image with content. Image is full width but 200px high -->
<div mc:repeatable="options" mc:variant="Main Background Image with Text overlay">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="width:100%;min-height:328px;height:328px;" background="https://gallery.mailchimp.com/fa85a578f928f05fa5750d667/images/cc24d737-fea1-4a47-87fb-517f5fecb2f4.jpg">
<tr>
<td style="font-size: 16px;line-height: 20px; font-family: Georgia, Arial, sans-serif;">
<!--[if gte mso 9]>
<v:rect style="width:600px;height:328px;" strokecolor="none" stroke="false">
<v:fill type="frame" color="#303131" src="https://gallery.mailchimp.com/fa85a578f928f05fa5750d667/images/cc24d737-fea1-4a47-87fb-517f5fecb2f4.jpg" /></v:fill>
</v:rect>
<v:shape id="bgImage" style="position:absolute;width:600px;height:328px;">
Which regex-characters must be escaped?
Special characters in regular expressions which have to be escaped are:. \ + * ? [ ^ ] $ ( ) { } = ! < > | : -
And a free escaper
https://www.regex-escape.com/regex-escaping-online.php
and a dummy bit of text to test