<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>The Code Cave</title><description>Cold storage before my best ideas melt away...</description><managingEditor>noemail@noemail.org (Brian)</managingEditor><pubDate>Thu, 24 Jan 2019 21:32:02 GMT</pubDate><generator>WordPress https://wordpress.org/</generator><link>https://thecodecave.com</link><language>en-us</language><itunes:explicit>no</itunes:explicit><copyright>(c) Brian Layman</copyright><itunes:subtitle>Cold storage before my best ideas melt away...</itunes:subtitle><itunes:author>The eHermit</itunes:author><itunes:owner><itunes:email>noemail@noemail.org</itunes:email><itunes:name>The eHermit</itunes:name></itunes:owner><item><title>Helpful Gutenberg Articles</title><link>https://thecodecave.com/helpful-gutenberg-articles/</link><category>WordPress</category><pubDate>Thu, 24 Jan 2019 20:52:30 GMT</pubDate><guid isPermaLink="false">https://thecodecave.com/?p=5388</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p><a href="https://organicthemes.com/create-custom-block-wordpress-gutenberg ">How to create a custom block for Gutenberg</a></p>
<p><a href="https://humanmade.com/2018/11/26/hot-module-replacement-for-gutenberg-blocks ">Hot Module Replacement for Gutenberg Blocks</a></p>
<p><a href="https://lazyblocks.com ">Gutenberg blocks visual constructor</a></p>
<p><a href="https://torquemag.io/2018/10/using-react-for-wordpress-gutenberg-development ">Using React For WordPress Gutenberg Development</a></p>
<p><a href="https://jasonyingling.me/working-with-editor-styles-in-gutenberg ">Working with Editor Styles in Gutenberg</a></p>
<p><a href="https://gutenbergcloud.org">Gutenberg Blocks in the Cloud</a></p>
<p><a href="https://blog.samuellevy.com/post/56-the-guten-the-berg-and-the-ugly.html">The Guten, the Berg, and the Ugly</a></p>
<p><a href="https://jasonyingling.me/notes-on-building-a-site-with-gutenberg">Notes on Building a Site with Gutenberg</a></p>
<p><a href="https://github.com/rtCamp/gutenberg-fields-middleware">Register fields for Gutenberg blocks with less repetitive code</a></p>
<p><a href="https://atomicblocks.com/anatomy-of-gutenberg-blocks">The Anatomy of Gutenberg Blocks in WordPress</a></p>
<p><a href="https://casabona.org/2018/09/gutenberg-price-table">Creating a Responsive Gutenberg Price Table</a></p>
<p><a href="https://atomicblocks.com/how-to-deprecate-gutenberg-editor-blocks">How to deprecate code in Gutenberg editor blocks</a></p>
<p><a href="https://code.tutsplus.com/tutorials/Blockswordpress-gutenberg-block-api-creating-custom-blocks--cms-31168">WordPress Gutenberg Block API: Creating Custom</a></p>
<p><a href="https://studiopress.blog/theme-color-palette">Add Theme Color Palette to the Gutenberg Block Editor for WordPress</a></p>
<p><a href="https://www.codeinwp.com/blog/make-plugin-compatible-with-gutenberg-sidebar-api">How to Make Your Plugin Compatible With Gutenberg using the Sidebar API</a></p>
<p><a href="https://theeventscalendar.com/gutenberg-block-editor-free-ebook">A Comprehensive Guide to the New Block Editor</a></p>
<p><a href="https://calderaforms.com/2018/08/website-accessible-using-gutenberg">How To Make Your Website Accessible Using Gutenberg</a></p>
<p><a href="https://www.ibenic.com/integrating-gutenberg-blocks-in-plugins">Integrating Gutenberg Blocks in Existing WordPress Plugins</a></p>
<p><a href="https://www.ibenic.com/enable-inner-blocks-gutenberg">How to enable Inner Blocks in your Gutenberg Block</a></p>
<p><a href="https://jasonyingling.me/using-create-guten-block-to-build-a-gutenberg-ready-plugin-with-multiple-blocks">Using Create Guten Block to Build a Gutenberg Ready Plugin with Multiple Blocks</a></p>
<p><a href="https://www.codeinwp.com/blog/adapt-your-plugin-for-gutenberg-block-api">How to Adapt Your Plugin for Gutenberg</a></p>
<p><a href="https://www.codeinwp.com/blog/best-gutenberg-compatible-themes">15+ Best Gutenberg-Compatible Themes</a></p>
<p><a href="https://editorblockswp.com/library">Gutenberg Block Library</a></p>
<p><a href="https://artisanthemes.io/sample-content-blocks-gutenberg">Sample Content Post for Testing Gutenberg</a></p>
<p><a href="https://jasonyingling.me/automatically-create-color-palettes-in-gutenberg-and-the-customizer">Automatically Create Color Palettes in Gutenberg and the Customizer</a></p>
<p><a href="https://jasonyingling.me/enqueueing-scripts-and-styles-for-gutenberg-blocks">Enqueueing Scripts and Styles for Gutenberg Blocks</a></p>
<p><a href="http://jschof.com/gutenberg-blocks/wordpress-gutenberg-blocks-example-creating-a-hero-image-block-with-inspector-controls-color-palette-and-media-upload-part-1">WordPress Gutenberg Blocks Example: Creating a Hero Image Block with Inspector Controls, Color Palette, and Media Upload</a></p>
<p><a href="http://jschof.com/gutenberg-blocks/gutenberg-blocks-made-easy">WordPress Gutenberg Blocks Made Easy</a></p>
<p><a href="https://smartcatdesign.net/articles/building-gutenberg-blocks-guide">Building WordPress Gutenberg Blocks : The Complete Guide</a></p>
<p><a href="http://jschof.com/gutenberg-blocks/gutenberg-blocks-setting-up-and-adding-css">WordPress Gutenberg Blocks: Setting up and enqueueing CSS in the editor and the view</a></p>
<p><a href="https://jacobmartella.com/2018/04/25/changing-shortcode-dynamic-gutenberg-block">Changing a shortcode to a dynamic Gutenberg block</a></p>
<p><a href="https://github.com/youknowriad/gutenberg-extensibility-workshop">Gutenberg Extensibility Workshop</a></p>
<p><a href="https://wpstackable.com">Stackable adds the missing design blocks and options you need in the Gutenberg editor</a></p>
<p><a href="https://www.joomunited.com/wordpress-products/advanced-gutenberg">Advanced Gutenberg is an enhancement of Gutenberg Editor</a></p>
<p><a href="https://github.com/ArrayHQ/atomic-blocks">Atomic Blocks is a collection of content blocks for the new Gutenberg block editor</a></p>
<p><a href="https://github.com/youknowriad/gcf"> Gutenberg Custom Fields</a></p>
<p><a href="https://github.com/youknowriad/gutenberg-vue"> A Gutenberg Vue Prototype</a></p>
<p><a href="https://github.com/youknowriad/averroes"> A Gutenberg compatible markdown editor. Write in Markdown, edit in Markdown and preview in HTML</a></p>
<p><a href="https://richtabor.com/gutenberg-block-unit-test">Preparing WordPress themes for Gutenberg with the Block Unit Test</a></p>
<p><a href="https://css-tricks.com/learning-gutenberg-1-series-intro">Learning Gutenberg Series</a></p>
<p><a href="https://richtabor.com/gutenberg-customizer-colors">How to Add Customizer Colors to Gutenberg Block Color Palettes</a></p>
<p><a href="https://richtabor.com/gutenberg-color-palettes">The Ultimate Guide to Gutenberg Color Palettes and Color Classes</a></p>
<p><a href="https://richtabor.com/gutenberg-image-alignments">The Ultimate Guide to Gutenberg Image Alignments in WordPress Themes</a></p>
<p><a href="https://jasonyingling.me/building-custom-gutenberg-blocks-with-the-richtext-component">Building Custom Gutenberg Blocks with the RichText Component</a></p>
<p><a href="https://jasonyingling.me/building-dynamic-blocks-for-the-gutenberg-editor-in-wordpress">Building Dynamic Blocks for the Gutenberg Editor in WordPress</a></p>
<p><a href="https://richtabor.com/disable-gutenberg-colors">How to Disable Custom Colors in the Gutenberg Block Editor</a></p>
<p><a href="https://github.com/youknowriad/dropit">Insert photos from unsplash.com directly inside your Gutenberg Editor</a></p>
<p><a href="https://coblocks.com">A suite of page builder Gutenberg blocks for publishers, writers and content marketers</a></p>
<p><a href="https://code.tutsplus.com/tutorials/wordpress-gutenberg-block-api-extending-blocks--cms-31320"> WordPress Gutenberg Block API: Extending Blocks</a></p>
<p><a href="https://wplift.com/gutenberg-tips">20+ WordPress Gutenberg Editor Tips To Help You Work More Productively</a></p>
<p><a href="https://themeshaper.com/2018/05/22/music-a-gutenberg-powered-theme">Music: A Gutenberg-Powered Theme</a></p>
<p><a href="https://wpshout.com/links/how-to-add-javascript-and-css-to-gutenberg-blocks">How to Add JavaScript and CSS to Gutenberg Blocks</a></p>
<p><a href="https://github.com/danielbachhuber/gutenberg-migration-guide"> Gutenberg Migration Guide</a></p>
<p><a href="https://webdevstudios.com/2018/05/01/wordpress-gutenberg-arrays-attributes-and-the-fundamental-flaw">Arrays, Attributes, and the Fundamental Flaw with Gutenberg</a></p>
<p><a href="https://themeshaper.com/2018/03/07/designing-gutenberg-block-driven-themes-with-sketch">Designing Themes with Gutenberg Blocks and Sketch</a></p>
<p><a href="http://jschof.com/gutenberg-blocks/gutenberg-blocks-creating-an-editable-field">Creating an editable field with Gutenberg Blocks</a></p>
<p><a href="https://www.billerickson.net/disabling-gutenberg-certain-templates">Disabling Gutenberg on certain templates</a></p>
<p><a href="https://codeable.io/what-gutenberg-woocommerce">What Will Gutenberg Mean For My WooCommerce Store?</a></p>
<p><a href="https://reaktivstudios.com/blog/gutenberg-attributes">How To Get Started with Attributes in Gutenberg Blocks</a></p>
<p><a href="https://wp.zacgordon.com/2017/12/26/how-to-add-javascript-and-css-to-gutenberg-blocks-the-right-way-in-plugins-and-themes">How to Add JavaScript and CSS to Gutenberg Blocks the Right Way in Plugins and Themes</a></p>
<p><a href="https://modularwp.com/gutenberg-block-custom-styles">How to Build a Gutenberg Block with Custom Styles</a></p>
<p><a href="https://pantheon.io/blog/how-convert-shortcode-gutenberg-block"> How to Convert a Shortcode to a Gutenberg Block</a></p>
<p><a href="https://modularwp.com/gutenberg-block-toolbar-control">How to Build a Gutenberg Block with a Toolbar Control</a></p>
<p><a href="http://moc.co/2018/02/masonry-galleries-gutenberg">Masonry Galleries &#038; Gutenberg</a></p>
<p><a href="https://tam.blog/2018/01/gutenberg-design-basics">Gutenberg Design Basics</a></p>
<p><a href="https://johnblackbourn.com/gutenberg-block-template-part">Rendering Dynamic Gutenberg Blocks in Theme Template Parts</a></p>
<p><a href="https://wp.zacgordon.com/2018/01/01/how-to-use-the-tooltip-component-in-gutenberg">How to Use the Tooltip Component in Gutenberg</a></p>
<p><a href="https://jasonyingling.me/gutenberg-best-practices-for-blocks-and-themes">Gutenberg Best Practices for Blocks and Themes</a></p>
<p><a href="https://jasonyingling.me/implementing-gutenberg-image-alignment-options-theme">Implementing Gutenberg Image Alignment Options into your Theme</a></p>
<p><a href="https://github.com/WordPress/gutenberg-starter-theme"> Gutenberg Starter Theme</a></p>
<p><a href="https://jasonyingling.me/understanding-gutenberg-blocks">Understanding Gutenberg Blocks</a></p>
<p><a href="https://www.billerickson.net/getting-your-theme-ready-for-gutenberg">Getting your theme ready for Gutenberg</a></p>
<p><a href="https://briangardner.com/theme-color-palette">Add Theme Color Palette to the WordPress Editor</a></p>
<p><a href="http://gutenberg.news/category/tutorials">Gutenberg Tutorials</a></p>
<p><a href="https://wisdomplugin.com/build-gutenberg-block-plugin">How to build a Gutenberg block plugin</a></p>
<p><a href="https://github.com/WordPress/gutenberg-examples">Examples for extending WordPress/Gutenberg with blocks</a></p>
<p><a href="https://github.com/Catapult-Themes/Feature-Block-Gutenberg"> Use Gutenberg to create Feature Blocks</a></p>
<p><a href="https://gutenberg.courses">Gutenberg Courses</a></p>
<p><a href="https://www.ibenic.com/create-gutenberg-block-displaying-post"> How to create a Gutenberg block for displaying a post</a></p>
<p><a href="https://gist.github.com/Shelob9/144055408101e2fdfc4bf34adc85dd04"> Example Gutenberg block with server-side rendering</a></p>
<p><a href="https://gist.github.com/royboy789/61a03af9652b8c7f7ac3865666d8e515"> Gutenberg React state example</a></p>
<p><a href="https://github.com/humanmade/hm-gutenberg-tools"> Useful helpers, components or tools for building things with Gutenberg</a></p>
<p><a href="https://github.com/tomjn/Frontenberg"> A limited frontend preview of the Gutenberg editor</a></p>
<p><a href="https://gist.github.com/royboy789/dfd470c9ffc5d4391f90348033d6bd64"> Gutenberg Block built with Vue.js</a></p>
<p><a href="https://github.com/ahmadawais/Gutenberg-Boilerplate"> WordPress Gutenberg Boilerplate</a></p>
<p><a href="https://github.com/mattheu/WordPress-Gutenberg-Mapbox-Block"> Mapbox Map block for the Gutenberg</a></p>
<p><a href="https://github.com/lucasstark/gutenberg-gravityforms"> Gravity Forms block for Gutenberg</a></p>
<p><a href="https://gist.github.com/pento/19b35d621709042fc899e394a9387a54"> Gutenberg Stars Block</a></p>
<p><a href="https://modularwp.com/how-to-build-gutenberg-blocks">How to Build Custom Gutenberg Blocks: a Beginner’s Guide</a></p>
<p><a href="https://github.com/Invulu/organic-profile-block"> A custom Gutenberg block for WordPress that displays a custom profile</a></p>
<p><a href="https://gist.github.com/igorbenic/970abd2e503c6c976fde0ae6d0172193"> Gutenberg Select Post &#8211; Duplicate Controls</a></p>
<p><a href="https://github.com/thatplugincompany/gutenkit-spacer-block"> Spacer Block for Gutenberg</a></p>
<p><a href="https://github.com/thatplugincompany/gutenkit-pricing-table-block"> Pricing tables for Gutenberg</a></p>
<p><a href="https://richtabor.com/add-wordpress-theme-styles-to-gutenberg">How to add WordPress Theme Styles to Gutenberg</a></p>
<p><a href="https://gist.github.com/aduth/369767f8153eaad1d955a8022f14ec34"> Vue Custom Element Gutenberg Block</a></p>
<p><a href="https://github.com/ahmadawais/create-guten-block"> A zero-configuration developer toolkit for building WordPress Gutenberg block plugins</a></p>
<p><a href="https://deliciousbrains.com/custom-gutenberg-block">Creating a custom Gutenberg block</a></p>
<p><a href="https://github.com/tharsheblows/grueziblock"> Couple examples of blocks and How to save post meta into blocks</a></p>
<p><a href="https://gutenkit.com/the-beginners-guide-to-building-gutenberg-blocks-part-1/"> Beginners guide for building Gutenberg blocks</a></p>
<div><span class="icon">This list is my own personal revision of Chris McCoy&#8217;s </span><a class="tooltipped tooltipped-s css-truncate" href="https://gist.github.com/chrismccoy/de8231206acacfc635c2ff9a5415459c#file-gutenberg-txt" aria-label="Permalink"><strong class="user-select-contain gist-blob-name css-truncate-target">gutenberg.txt gist</strong></a>. I&#8217;ve converted them all to hyperlinks for my convenience. You may wish to visit the original to see if any new ones have been added since the publication of this artice.</div>
<div></div>
]]></content:encoded><description>How to create a custom block for Gutenberg Hot Module Replacement for Gutenberg Blocks Gutenberg blocks visual constructor Using React For WordPress Gutenberg Development Working with Editor Styles in Gutenberg Gutenberg Blocks in the Cloud The Guten, the Berg, and the Ugly Notes on Building a Site with Gutenberg Register fields for Gutenberg blocks with [&amp;#8230;]</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noemail@noemail.org (The eHermit)</author></item><item><title>Count Down Closing Timer and dealing with DST in JavaScript</title><link>https://thecodecave.com/count-down-closing-timer-and-dealing-with-dst-in-javascript/</link><category>JavaScript</category><pubDate>Wed, 23 Jan 2019 20:49:40 GMT</pubDate><guid isPermaLink="false">https://thecodecave.com/?p=5383</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<pre>You can add these date prototypes to properly display the date and time in another location regardless of whether you are in DST or you or the destination observe DST

			Date.prototype.stdTimezoneOffset = function () {
				var jan = new Date(this.getFullYear(), 0, 1);
				var jul = new Date(this.getFullYear(), 6, 1);
				return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());
			}

			Date.prototype.isDSTNow = function () {
				return this.getTimezoneOffset() &lt; this.stdTimezoneOffset();
			}

			Date.prototype.isDSTObserved = function () {
				var jan = new Date(this.getFullYear(), 0, 1);
				var jul = new Date(this.getFullYear(), 6, 1);
				return jan.getTimezoneOffset() != jul.getTimezoneOffset();
			}

			Date.prototype.couldBeDST = function () {
				var d = new Date();
				var month = d.getMonth();
				var day = d.getDate();
				var dow = d.getDay();
				var previousSunday = day - dow;
				// January, February, and December are out.
				if (month &lt; 3 || month &gt; 11) { return false; }
				// April throuh October is in.
				if (month &gt; 3 &amp;&amp; month &lt; 11) { return true; } // In March, we are DST if our previous sunday was on or after the 8th. if (month == 3) { return previousSunday &gt;= 8; }
				// In November we must be before the first Sunday to be DST.
				// That means the previous Sunday must be in the previous month
				// aka less than/before the 1st.
				return previousSunday &lt; 1;
			}

</pre>
<p>Full Code<br />
This example takes an hours array with unique IDs and TZ info about a location and uses the current information to update the appropriate on screen timer every 1 second.</p>
<pre> 
jQuery( document ).ready(function($) {
	var now = new Date();
	var weekday = new Array(7);
	var isOpen = function(hours,currentTime,offsetHours,locationHasDST,isDST,hasDSTLocal,couldBeDST){
			var result = false;
			if (hours == '') {
				return false;
			} else {
				hours.forEach( function(hourSet) {
					splitHours = hourSet.split(',');
					var isoDate = new Date(currentTime.getTime() - (currentTime.getTimezoneOffset() * 60000)).toISOString();
					var open = new Date(isoDate.substring(0, 10) + ' ' + splitHours[0]);
					var close = new Date(isoDate.substring(0, 10) + ' ' + splitHours[1]);
					var offsetSec = ( offsetHours * 60 * 60 ) + ( currentTime.getTimezoneOffset() * 60 );
					if (locationHasDST &amp;&amp; !hasDSTLocal &amp;&amp; couldBeDST) {	
						// eg Looking at EDT from AZ/MST
						// This is the one case here isDST and couldBeDST are not equal
						offsetSec = offsetSec - 3600;
					} else if (!locationHasDST &amp;&amp; isDST &amp;&amp; hasDSTLocal) {
						// Looking at EDT from AZ/MST 3 = (5) + (-7) + 1. So I need to take 3 more hours to count down timer.
						offsetSec = offsetSec + 3600;
					}

					if ((open.getTime() &lt; (currentTime.getTime() + offsetSec*1000)) &amp;&amp; ((currentTime.getTime() + offsetSec*1000 ) &lt; close.getTime()))  {
						result = ((close.getTime() - currentTime.getTime())/1000) - offsetSec;
					}
				});
				return result;
			}
		}
	var checkTime = function(hours,offsetHours,locationHasDST) {
			Date.prototype.stdTimezoneOffset = function () {
				var jan = new Date(this.getFullYear(), 0, 1);
				var jul = new Date(this.getFullYear(), 6, 1);
				return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());
			}

			Date.prototype.isDSTNow = function () {
				return this.getTimezoneOffset() &lt; this.stdTimezoneOffset();
			}

			Date.prototype.isDSTObserved = function () {
				var jan = new Date(this.getFullYear(), 0, 1);
				var jul = new Date(this.getFullYear(), 6, 1);
				return jan.getTimezoneOffset() != jul.getTimezoneOffset();
			}

			Date.prototype.couldBeDST = function () {
				var d = new Date();
				var month = d.getMonth();
				var day = d.getDate();
				var dow = d.getDay();
				var previousSunday = day - dow;
				// January, February, and December are out.
				if (month &lt; 3 || month &gt; 11) { return false; }
				// April throuh October is in.
				if (month &gt; 3 &amp;&amp; month &lt; 11) { return true; } // In March, we are DST if our previous sunday was on or after the 8th. if (month == 3) { return previousSunday &gt;= 8; }
				// In November we must be before the first Sunday to be DST.
				// That means the previous Sunday must be in the previous month
				// aka less than/before the 1st.
				return previousSunday &lt; 1; } var now = new Date(); var isDST = now.isDstObserved(); var today = weekday[now.getDay()]; var dayOfWeek = now.getDay(); var hour = now.getHours(); var minutes = now.getMinutes(); var today = weekday[now.getDay()]; //add AM or PM var suffix = hour &gt;= 12 ? "PM" : "AM";

			// add 0 to one digit minutes
			if (minutes &lt; 10) {
				minutes = "0" + minutes
			};
			
			hour = ((hour + 11) % 12 + 1); //i.e. show 1:15 instead of 13:15

			for (var curPostID in inHours ) {
				// Assign the needed variables while in scope.
				var timeDiv = document.getElementById('timeDiv-' + curPostID);
				var hours = inHours[curPostID][today];
				var offsetHours = inOffsetHours[curPostID];
				var hasDST = inObservesDST[curPostID]  == "yes";
				secondsLeft = isOpen(hours,now,offsetHours,hasDST,isDST);
				if (secondsLeft) {
					ooc = 'open';
					hours=Math.floor(secondsLeft/3600);
					min=Math.floor(secondsLeft/60)-hours*60;
					seconds=Math.floor(secondsLeft%60);
					var closingTime = hours + ':' + ("0" + min).slice (-2) + ':' + ("0" + seconds).slice (-2);

					timeDiv.innerHTML = 'YOUR MESSAGE';
				} else {
					ooc = 'closed';
					var closingIn = '<a href="tel:(800) 288-1407">(800) 288-1407</a>';
					timeDiv.innerHTML = 'YOUR MESSAGE';
				}
				timeDiv.className = "timeDiv " + ooc;
				timeDiv.style.display = "block";
			}
			
		};

	/* MAIN CODE SECTION EXECUTED ON READY */
	// Populate the Weekday variable
	weekday[0] = "sunday";
	weekday[1] = "monday";
	weekday[2] = "tuesday";
	weekday[3] = "wednesday";
	weekday[4] = "thursday";
	weekday[5] = "friday";
	weekday[6] = "saturday";

	var posts = arrVars["arrHours"];

	for (var curPostID in posts ) {
		var currentDay = weekday[now.getDay()];
		var currentDayID = "#" + currentDay + '-' + curPostID; //gets todays weekday and turns it into id

		// All of the setup is now complete.  Now do the work.

		$(currentDayID).toggleClass("today"); //hightlights today in the view hours modal popup

		var iDay;
		var i=10;
		for (iDay = 0; iDay &lt; 7; iDay++) { var loopDay = weekday[iDay]; var loopDayTimeDiv = "#" + loopDay + '-' + curPostID + ' div.time'; var loopHours = arrVars["arrHours"][curPostID][loopDay]; if (loopHours == '') { hoursString = "Closed"; } else { var hoursString = ''; loopHours.forEach(function(hoursSet){ hoursSet = hoursSet.replace(/ AM/g,'am'); hoursSet = hoursSet.replace(',',' - '); hoursSet = hoursSet.replace(/ PM/g,'pm'); if (hoursString &gt; '') hoursString += '
';
				hoursString += hoursSet;
				});
			}
			$(loopDayTimeDiv).html(hoursString);
		}

	}

	setInterval( function(){
			checkTime(arrVars["arrHours"],arrVars["offsetHours"],arrVars["observesDST"])
		}, 1000);

});
</pre>
<p>});</p>
]]></content:encoded><description>You can add these date prototypes to properly display the date and time in another location regardless of whether you are in DST or you or the destination observe DST Date.prototype.stdTimezoneOffset = function () { var jan = new Date(this.getFullYear(), 0, 1); var jul = new Date(this.getFullYear(), 6, 1); return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()); } Date.prototype.isDSTNow = [&amp;#8230;]</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noemail@noemail.org (The eHermit)</author></item><item><title>Every chmod permission converted from numeric &amp;#038; displayed in ls style</title><link>https://thecodecave.com/every-chmod-permission-converted-from-numeric-displayed-in-ls-style/</link><category>Random thoughts</category><pubDate>Fri, 15 Dec 2017 17:58:38 GMT</pubDate><guid isPermaLink="false">https://thecodecave.com/?p=5333</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>chmod 0<br />
&#8212;&#8212;&#8212;-<br />
chmod 1<br />
&#8212;&#8212;&#8212;x<br />
chmod 2<br />
&#8212;&#8212;&#8211;w-<br />
chmod 3<br />
&#8212;&#8212;&#8211;wx<br />
chmod 4<br />
&#8212;&#8212;-r&#8211;<br />
chmod 5<br />
&#8212;&#8212;-r-x<br />
chmod 6<br />
&#8212;&#8212;-rw-<br />
chmod 7<br />
&#8212;&#8212;-rwx<br />
chmod 10<br />
&#8212;&#8212;x&#8212;<br />
chmod 11<br />
&#8212;&#8212;x&#8211;x<br />
chmod 12<br />
&#8212;&#8212;x-w-<br />
chmod 13<br />
&#8212;&#8212;x-wx<br />
chmod 14<br />
&#8212;&#8212;xr&#8211;<br />
chmod 15<br />
&#8212;&#8212;xr-x<br />
chmod 16<br />
&#8212;&#8212;xrw-<br />
chmod 17<br />
&#8212;&#8212;xrwx<br />
chmod 20<br />
&#8212;&#8211;w&#8212;-<br />
chmod 21<br />
&#8212;&#8211;w&#8212;x<br />
chmod 22<br />
&#8212;&#8211;w&#8211;w-<br />
chmod 23<br />
&#8212;&#8211;w&#8211;wx<br />
chmod 24<br />
&#8212;&#8211;w-r&#8211;<br />
chmod 25<br />
&#8212;&#8211;w-r-x<br />
chmod 26<br />
&#8212;&#8211;w-rw-<br />
chmod 27<br />
&#8212;&#8211;w-rwx<br />
chmod 30<br />
&#8212;&#8211;wx&#8212;<br />
chmod 31<br />
&#8212;&#8211;wx&#8211;x<br />
chmod 32<br />
&#8212;&#8211;wx-w-<br />
chmod 33<br />
&#8212;&#8211;wx-wx<br />
chmod 34<br />
&#8212;&#8211;wxr&#8211;<br />
chmod 35<br />
&#8212;&#8211;wxr-x<br />
chmod 36<br />
&#8212;&#8211;wxrw-<br />
chmod 37<br />
&#8212;&#8211;wxrwx<br />
chmod 40<br />
&#8212;-r&#8212;&#8211;<br />
chmod 41<br />
&#8212;-r&#8212;-x<br />
chmod 42<br />
&#8212;-r&#8212;w-<br />
chmod 43<br />
&#8212;-r&#8212;wx<br />
chmod 44<br />
&#8212;-r&#8211;r&#8211;<br />
chmod 45<br />
&#8212;-r&#8211;r-x<br />
chmod 46<br />
&#8212;-r&#8211;rw-<br />
chmod 47<br />
&#8212;-r&#8211;rwx<br />
chmod 50<br />
&#8212;-r-x&#8212;<br />
chmod 51<br />
&#8212;-r-x&#8211;x<br />
chmod 52<br />
&#8212;-r-x-w-<br />
chmod 53<br />
&#8212;-r-x-wx<br />
chmod 54<br />
&#8212;-r-xr&#8211;<br />
chmod 55<br />
&#8212;-r-xr-x<br />
chmod 56<br />
&#8212;-r-xrw-<br />
chmod 57<br />
&#8212;-r-xrwx<br />
chmod 60<br />
&#8212;-rw&#8212;-<br />
chmod 61<br />
&#8212;-rw&#8212;x<br />
chmod 62<br />
&#8212;-rw&#8211;w-<br />
chmod 63<br />
&#8212;-rw&#8211;wx<br />
chmod 64<br />
&#8212;-rw-r&#8211;<br />
chmod 65<br />
&#8212;-rw-r-x<br />
chmod 66<br />
&#8212;-rw-rw-<br />
chmod 67<br />
&#8212;-rw-rwx<br />
chmod 70<br />
&#8212;-rwx&#8212;<br />
chmod 71<br />
&#8212;-rwx&#8211;x<br />
chmod 72<br />
&#8212;-rwx-w-<br />
chmod 73<br />
&#8212;-rwx-wx<br />
chmod 74<br />
&#8212;-rwxr&#8211;<br />
chmod 75<br />
&#8212;-rwxr-x<br />
chmod 76<br />
&#8212;-rwxrw-<br />
chmod 77<br />
&#8212;-rwxrwx<br />
chmod 100<br />
&#8212;x&#8212;&#8212;<br />
chmod 101<br />
&#8212;x&#8212;&#8211;x<br />
chmod 102<br />
&#8212;x&#8212;-w-<br />
chmod 103<br />
&#8212;x&#8212;-wx<br />
chmod 104<br />
&#8212;x&#8212;r&#8211;<br />
chmod 105<br />
&#8212;x&#8212;r-x<br />
chmod 106<br />
&#8212;x&#8212;rw-<br />
chmod 107<br />
&#8212;x&#8212;rwx<br />
chmod 110<br />
&#8212;x&#8211;x&#8212;<br />
chmod 111<br />
&#8212;x&#8211;x&#8211;x<br />
chmod 112<br />
&#8212;x&#8211;x-w-<br />
chmod 113<br />
&#8212;x&#8211;x-wx<br />
chmod 114<br />
&#8212;x&#8211;xr&#8211;<br />
chmod 115<br />
&#8212;x&#8211;xr-x<br />
chmod 116<br />
&#8212;x&#8211;xrw-<br />
chmod 117<br />
&#8212;x&#8211;xrwx<br />
chmod 120<br />
&#8212;x-w&#8212;-<br />
chmod 121<br />
&#8212;x-w&#8212;x<br />
chmod 122<br />
&#8212;x-w&#8211;w-<br />
chmod 123<br />
&#8212;x-w&#8211;wx<br />
chmod 124<br />
&#8212;x-w-r&#8211;<br />
chmod 125<br />
&#8212;x-w-r-x<br />
chmod 126<br />
&#8212;x-w-rw-<br />
chmod 127<br />
&#8212;x-w-rwx<br />
chmod 130<br />
&#8212;x-wx&#8212;<br />
chmod 131<br />
&#8212;x-wx&#8211;x<br />
chmod 132<br />
&#8212;x-wx-w-<br />
chmod 133<br />
&#8212;x-wx-wx<br />
chmod 134<br />
&#8212;x-wxr&#8211;<br />
chmod 135<br />
&#8212;x-wxr-x<br />
chmod 136<br />
&#8212;x-wxrw-<br />
chmod 137<br />
&#8212;x-wxrwx<br />
chmod 140<br />
&#8212;xr&#8212;&#8211;<br />
chmod 141<br />
&#8212;xr&#8212;-x<br />
chmod 142<br />
&#8212;xr&#8212;w-<br />
chmod 143<br />
&#8212;xr&#8212;wx<br />
chmod 144<br />
&#8212;xr&#8211;r&#8211;<br />
chmod 145<br />
&#8212;xr&#8211;r-x<br />
chmod 146<br />
&#8212;xr&#8211;rw-<br />
chmod 147<br />
&#8212;xr&#8211;rwx<br />
chmod 150<br />
&#8212;xr-x&#8212;<br />
chmod 151<br />
&#8212;xr-x&#8211;x<br />
chmod 152<br />
&#8212;xr-x-w-<br />
chmod 153<br />
&#8212;xr-x-wx<br />
chmod 154<br />
&#8212;xr-xr&#8211;<br />
chmod 155<br />
&#8212;xr-xr-x<br />
chmod 156<br />
&#8212;xr-xrw-<br />
chmod 157<br />
&#8212;xr-xrwx<br />
chmod 160<br />
&#8212;xrw&#8212;-<br />
chmod 161<br />
&#8212;xrw&#8212;x<br />
chmod 162<br />
&#8212;xrw&#8211;w-<br />
chmod 163<br />
&#8212;xrw&#8211;wx<br />
chmod 164<br />
&#8212;xrw-r&#8211;<br />
chmod 165<br />
&#8212;xrw-r-x<br />
chmod 166<br />
&#8212;xrw-rw-<br />
chmod 167<br />
&#8212;xrw-rwx<br />
chmod 170<br />
&#8212;xrwx&#8212;<br />
chmod 171<br />
&#8212;xrwx&#8211;x<br />
chmod 172<br />
&#8212;xrwx-w-<br />
chmod 173<br />
&#8212;xrwx-wx<br />
chmod 174<br />
&#8212;xrwxr&#8211;<br />
chmod 175<br />
&#8212;xrwxr-x<br />
chmod 176<br />
&#8212;xrwxrw-<br />
chmod 177<br />
&#8212;xrwxrwx<br />
chmod 200<br />
&#8211;w&#8212;&#8212;-<br />
chmod 201<br />
&#8211;w&#8212;&#8212;x<br />
chmod 202<br />
&#8211;w&#8212;&#8211;w-<br />
chmod 203<br />
&#8211;w&#8212;&#8211;wx<br />
chmod 204<br />
&#8211;w&#8212;-r&#8211;<br />
chmod 205<br />
&#8211;w&#8212;-r-x<br />
chmod 206<br />
&#8211;w&#8212;-rw-<br />
chmod 207<br />
&#8211;w&#8212;-rwx<br />
chmod 210<br />
&#8211;w&#8212;x&#8212;<br />
chmod 211<br />
&#8211;w&#8212;x&#8211;x<br />
chmod 212<br />
&#8211;w&#8212;x-w-<br />
chmod 213<br />
&#8211;w&#8212;x-wx<br />
chmod 214<br />
&#8211;w&#8212;xr&#8211;<br />
chmod 215<br />
&#8211;w&#8212;xr-x<br />
chmod 216<br />
&#8211;w&#8212;xrw-<br />
chmod 217<br />
&#8211;w&#8212;xrwx<br />
chmod 220<br />
&#8211;w&#8211;w&#8212;-<br />
chmod 221<br />
&#8211;w&#8211;w&#8212;x<br />
chmod 222<br />
&#8211;w&#8211;w&#8211;w-<br />
chmod 223<br />
&#8211;w&#8211;w&#8211;wx<br />
chmod 224<br />
&#8211;w&#8211;w-r&#8211;<br />
chmod 225<br />
&#8211;w&#8211;w-r-x<br />
chmod 226<br />
&#8211;w&#8211;w-rw-<br />
chmod 227<br />
&#8211;w&#8211;w-rwx<br />
chmod 230<br />
&#8211;w&#8211;wx&#8212;<br />
chmod 231<br />
&#8211;w&#8211;wx&#8211;x<br />
chmod 232<br />
&#8211;w&#8211;wx-w-<br />
chmod 233<br />
&#8211;w&#8211;wx-wx<br />
chmod 234<br />
&#8211;w&#8211;wxr&#8211;<br />
chmod 235<br />
&#8211;w&#8211;wxr-x<br />
chmod 236<br />
&#8211;w&#8211;wxrw-<br />
chmod 237<br />
&#8211;w&#8211;wxrwx<br />
chmod 240<br />
&#8211;w-r&#8212;&#8211;<br />
chmod 241<br />
&#8211;w-r&#8212;-x<br />
chmod 242<br />
&#8211;w-r&#8212;w-<br />
chmod 243<br />
&#8211;w-r&#8212;wx<br />
chmod 244<br />
&#8211;w-r&#8211;r&#8211;<br />
chmod 245<br />
&#8211;w-r&#8211;r-x<br />
chmod 246<br />
&#8211;w-r&#8211;rw-<br />
chmod 247<br />
&#8211;w-r&#8211;rwx<br />
chmod 250<br />
&#8211;w-r-x&#8212;<br />
chmod 251<br />
&#8211;w-r-x&#8211;x<br />
chmod 252<br />
&#8211;w-r-x-w-<br />
chmod 253<br />
&#8211;w-r-x-wx<br />
chmod 254<br />
&#8211;w-r-xr&#8211;<br />
chmod 255<br />
&#8211;w-r-xr-x<br />
chmod 256<br />
&#8211;w-r-xrw-<br />
chmod 257<br />
&#8211;w-r-xrwx<br />
chmod 260<br />
&#8211;w-rw&#8212;-<br />
chmod 261<br />
&#8211;w-rw&#8212;x<br />
chmod 262<br />
&#8211;w-rw&#8211;w-<br />
chmod 263<br />
&#8211;w-rw&#8211;wx<br />
chmod 264<br />
&#8211;w-rw-r&#8211;<br />
chmod 265<br />
&#8211;w-rw-r-x<br />
chmod 266<br />
&#8211;w-rw-rw-<br />
chmod 267<br />
&#8211;w-rw-rwx<br />
chmod 270<br />
&#8211;w-rwx&#8212;<br />
chmod 271<br />
&#8211;w-rwx&#8211;x<br />
chmod 272<br />
&#8211;w-rwx-w-<br />
chmod 273<br />
&#8211;w-rwx-wx<br />
chmod 274<br />
&#8211;w-rwxr&#8211;<br />
chmod 275<br />
&#8211;w-rwxr-x<br />
chmod 276<br />
&#8211;w-rwxrw-<br />
chmod 277<br />
&#8211;w-rwxrwx<br />
chmod 300<br />
&#8211;wx&#8212;&#8212;<br />
chmod 301<br />
&#8211;wx&#8212;&#8211;x<br />
chmod 302<br />
&#8211;wx&#8212;-w-<br />
chmod 303<br />
&#8211;wx&#8212;-wx<br />
chmod 304<br />
&#8211;wx&#8212;r&#8211;<br />
chmod 305<br />
&#8211;wx&#8212;r-x<br />
chmod 306<br />
&#8211;wx&#8212;rw-<br />
chmod 307<br />
&#8211;wx&#8212;rwx<br />
chmod 310<br />
&#8211;wx&#8211;x&#8212;<br />
chmod 311<br />
&#8211;wx&#8211;x&#8211;x<br />
chmod 312<br />
&#8211;wx&#8211;x-w-<br />
chmod 313<br />
&#8211;wx&#8211;x-wx<br />
chmod 314<br />
&#8211;wx&#8211;xr&#8211;<br />
chmod 315<br />
&#8211;wx&#8211;xr-x<br />
chmod 316<br />
&#8211;wx&#8211;xrw-<br />
chmod 317<br />
&#8211;wx&#8211;xrwx<br />
chmod 320<br />
&#8211;wx-w&#8212;-<br />
chmod 321<br />
&#8211;wx-w&#8212;x<br />
chmod 322<br />
&#8211;wx-w&#8211;w-<br />
chmod 323<br />
&#8211;wx-w&#8211;wx<br />
chmod 324<br />
&#8211;wx-w-r&#8211;<br />
chmod 325<br />
&#8211;wx-w-r-x<br />
chmod 326<br />
&#8211;wx-w-rw-<br />
chmod 327<br />
&#8211;wx-w-rwx<br />
chmod 330<br />
&#8211;wx-wx&#8212;<br />
chmod 331<br />
&#8211;wx-wx&#8211;x<br />
chmod 332<br />
&#8211;wx-wx-w-<br />
chmod 333<br />
&#8211;wx-wx-wx<br />
chmod 334<br />
&#8211;wx-wxr&#8211;<br />
chmod 335<br />
&#8211;wx-wxr-x<br />
chmod 336<br />
&#8211;wx-wxrw-<br />
chmod 337<br />
&#8211;wx-wxrwx<br />
chmod 340<br />
&#8211;wxr&#8212;&#8211;<br />
chmod 341<br />
&#8211;wxr&#8212;-x<br />
chmod 342<br />
&#8211;wxr&#8212;w-<br />
chmod 343<br />
&#8211;wxr&#8212;wx<br />
chmod 344<br />
&#8211;wxr&#8211;r&#8211;<br />
chmod 345<br />
&#8211;wxr&#8211;r-x<br />
chmod 346<br />
&#8211;wxr&#8211;rw-<br />
chmod 347<br />
&#8211;wxr&#8211;rwx<br />
chmod 350<br />
&#8211;wxr-x&#8212;<br />
chmod 351<br />
&#8211;wxr-x&#8211;x<br />
chmod 352<br />
&#8211;wxr-x-w-<br />
chmod 353<br />
&#8211;wxr-x-wx<br />
chmod 354<br />
&#8211;wxr-xr&#8211;<br />
chmod 355<br />
&#8211;wxr-xr-x<br />
chmod 356<br />
&#8211;wxr-xrw-<br />
chmod 357<br />
&#8211;wxr-xrwx<br />
chmod 360<br />
&#8211;wxrw&#8212;-<br />
chmod 361<br />
&#8211;wxrw&#8212;x<br />
chmod 362<br />
&#8211;wxrw&#8211;w-<br />
chmod 363<br />
&#8211;wxrw&#8211;wx<br />
chmod 364<br />
&#8211;wxrw-r&#8211;<br />
chmod 365<br />
&#8211;wxrw-r-x<br />
chmod 366<br />
&#8211;wxrw-rw-<br />
chmod 367<br />
&#8211;wxrw-rwx<br />
chmod 370<br />
&#8211;wxrwx&#8212;<br />
chmod 371<br />
&#8211;wxrwx&#8211;x<br />
chmod 372<br />
&#8211;wxrwx-w-<br />
chmod 373<br />
&#8211;wxrwx-wx<br />
chmod 374<br />
&#8211;wxrwxr&#8211;<br />
chmod 375<br />
&#8211;wxrwxr-x<br />
chmod 376<br />
&#8211;wxrwxrw-<br />
chmod 377<br />
&#8211;wxrwxrwx<br />
chmod 400<br />
-r&#8212;&#8212;&#8211;<br />
chmod 401<br />
-r&#8212;&#8212;-x<br />
chmod 402<br />
-r&#8212;&#8212;w-<br />
chmod 403<br />
-r&#8212;&#8212;wx<br />
chmod 404<br />
-r&#8212;&#8211;r&#8211;<br />
chmod 405<br />
-r&#8212;&#8211;r-x<br />
chmod 406<br />
-r&#8212;&#8211;rw-<br />
chmod 407<br />
-r&#8212;&#8211;rwx<br />
chmod 410<br />
-r&#8212;-x&#8212;<br />
chmod 411<br />
-r&#8212;-x&#8211;x<br />
chmod 412<br />
-r&#8212;-x-w-<br />
chmod 413<br />
-r&#8212;-x-wx<br />
chmod 414<br />
-r&#8212;-xr&#8211;<br />
chmod 415<br />
-r&#8212;-xr-x<br />
chmod 416<br />
-r&#8212;-xrw-<br />
chmod 417<br />
-r&#8212;-xrwx<br />
chmod 420<br />
-r&#8212;w&#8212;-<br />
chmod 421<br />
-r&#8212;w&#8212;x<br />
chmod 422<br />
-r&#8212;w&#8211;w-<br />
chmod 423<br />
-r&#8212;w&#8211;wx<br />
chmod 424<br />
-r&#8212;w-r&#8211;<br />
chmod 425<br />
-r&#8212;w-r-x<br />
chmod 426<br />
-r&#8212;w-rw-<br />
chmod 427<br />
-r&#8212;w-rwx<br />
chmod 430<br />
-r&#8212;wx&#8212;<br />
chmod 431<br />
-r&#8212;wx&#8211;x<br />
chmod 432<br />
-r&#8212;wx-w-<br />
chmod 433<br />
-r&#8212;wx-wx<br />
chmod 434<br />
-r&#8212;wxr&#8211;<br />
chmod 435<br />
-r&#8212;wxr-x<br />
chmod 436<br />
-r&#8212;wxrw-<br />
chmod 437<br />
-r&#8212;wxrwx<br />
chmod 440<br />
-r&#8211;r&#8212;&#8211;<br />
chmod 441<br />
-r&#8211;r&#8212;-x<br />
chmod 442<br />
-r&#8211;r&#8212;w-<br />
chmod 443<br />
-r&#8211;r&#8212;wx<br />
chmod 444<br />
-r&#8211;r&#8211;r&#8211;<br />
chmod 445<br />
-r&#8211;r&#8211;r-x<br />
chmod 446<br />
-r&#8211;r&#8211;rw-<br />
chmod 447<br />
-r&#8211;r&#8211;rwx<br />
chmod 450<br />
-r&#8211;r-x&#8212;<br />
chmod 451<br />
-r&#8211;r-x&#8211;x<br />
chmod 452<br />
-r&#8211;r-x-w-<br />
chmod 453<br />
-r&#8211;r-x-wx<br />
chmod 454<br />
-r&#8211;r-xr&#8211;<br />
chmod 455<br />
-r&#8211;r-xr-x<br />
chmod 456<br />
-r&#8211;r-xrw-<br />
chmod 457<br />
-r&#8211;r-xrwx<br />
chmod 460<br />
-r&#8211;rw&#8212;-<br />
chmod 461<br />
-r&#8211;rw&#8212;x<br />
chmod 462<br />
-r&#8211;rw&#8211;w-<br />
chmod 463<br />
-r&#8211;rw&#8211;wx<br />
chmod 464<br />
-r&#8211;rw-r&#8211;<br />
chmod 465<br />
-r&#8211;rw-r-x<br />
chmod 466<br />
-r&#8211;rw-rw-<br />
chmod 467<br />
-r&#8211;rw-rwx<br />
chmod 470<br />
-r&#8211;rwx&#8212;<br />
chmod 471<br />
-r&#8211;rwx&#8211;x<br />
chmod 472<br />
-r&#8211;rwx-w-<br />
chmod 473<br />
-r&#8211;rwx-wx<br />
chmod 474<br />
-r&#8211;rwxr&#8211;<br />
chmod 475<br />
-r&#8211;rwxr-x<br />
chmod 476<br />
-r&#8211;rwxrw-<br />
chmod 477<br />
-r&#8211;rwxrwx<br />
chmod 500<br />
-r-x&#8212;&#8212;<br />
chmod 501<br />
-r-x&#8212;&#8211;x<br />
chmod 502<br />
-r-x&#8212;-w-<br />
chmod 503<br />
-r-x&#8212;-wx<br />
chmod 504<br />
-r-x&#8212;r&#8211;<br />
chmod 505<br />
-r-x&#8212;r-x<br />
chmod 506<br />
-r-x&#8212;rw-<br />
chmod 507<br />
-r-x&#8212;rwx<br />
chmod 510<br />
-r-x&#8211;x&#8212;<br />
chmod 511<br />
-r-x&#8211;x&#8211;x<br />
chmod 512<br />
-r-x&#8211;x-w-<br />
chmod 513<br />
-r-x&#8211;x-wx<br />
chmod 514<br />
-r-x&#8211;xr&#8211;<br />
chmod 515<br />
-r-x&#8211;xr-x<br />
chmod 516<br />
-r-x&#8211;xrw-<br />
chmod 517<br />
-r-x&#8211;xrwx<br />
chmod 520<br />
-r-x-w&#8212;-<br />
chmod 521<br />
-r-x-w&#8212;x<br />
chmod 522<br />
-r-x-w&#8211;w-<br />
chmod 523<br />
-r-x-w&#8211;wx<br />
chmod 524<br />
-r-x-w-r&#8211;<br />
chmod 525<br />
-r-x-w-r-x<br />
chmod 526<br />
-r-x-w-rw-<br />
chmod 527<br />
-r-x-w-rwx<br />
chmod 530<br />
-r-x-wx&#8212;<br />
chmod 531<br />
-r-x-wx&#8211;x<br />
chmod 532<br />
-r-x-wx-w-<br />
chmod 533<br />
-r-x-wx-wx<br />
chmod 534<br />
-r-x-wxr&#8211;<br />
chmod 535<br />
-r-x-wxr-x<br />
chmod 536<br />
-r-x-wxrw-<br />
chmod 537<br />
-r-x-wxrwx<br />
chmod 540<br />
-r-xr&#8212;&#8211;<br />
chmod 541<br />
-r-xr&#8212;-x<br />
chmod 542<br />
-r-xr&#8212;w-<br />
chmod 543<br />
-r-xr&#8212;wx<br />
chmod 544<br />
-r-xr&#8211;r&#8211;<br />
chmod 545<br />
-r-xr&#8211;r-x<br />
chmod 546<br />
-r-xr&#8211;rw-<br />
chmod 547<br />
-r-xr&#8211;rwx<br />
chmod 550<br />
-r-xr-x&#8212;<br />
chmod 551<br />
-r-xr-x&#8211;x<br />
chmod 552<br />
-r-xr-x-w-<br />
chmod 553<br />
-r-xr-x-wx<br />
chmod 554<br />
-r-xr-xr&#8211;<br />
chmod 555<br />
-r-xr-xr-x<br />
chmod 556<br />
-r-xr-xrw-<br />
chmod 557<br />
-r-xr-xrwx<br />
chmod 560<br />
-r-xrw&#8212;-<br />
chmod 561<br />
-r-xrw&#8212;x<br />
chmod 562<br />
-r-xrw&#8211;w-<br />
chmod 563<br />
-r-xrw&#8211;wx<br />
chmod 564<br />
-r-xrw-r&#8211;<br />
chmod 565<br />
-r-xrw-r-x<br />
chmod 566<br />
-r-xrw-rw-<br />
chmod 567<br />
-r-xrw-rwx<br />
chmod 570<br />
-r-xrwx&#8212;<br />
chmod 571<br />
-r-xrwx&#8211;x<br />
chmod 572<br />
-r-xrwx-w-<br />
chmod 573<br />
-r-xrwx-wx<br />
chmod 574<br />
-r-xrwxr&#8211;<br />
chmod 575<br />
-r-xrwxr-x<br />
chmod 576<br />
-r-xrwxrw-<br />
chmod 577<br />
-r-xrwxrwx<br />
chmod 600<br />
-rw&#8212;&#8212;-<br />
chmod 601<br />
-rw&#8212;&#8212;x<br />
chmod 602<br />
-rw&#8212;&#8211;w-<br />
chmod 603<br />
-rw&#8212;&#8211;wx<br />
chmod 604<br />
-rw&#8212;-r&#8211;<br />
chmod 605<br />
-rw&#8212;-r-x<br />
chmod 606<br />
-rw&#8212;-rw-<br />
chmod 607<br />
-rw&#8212;-rwx<br />
chmod 610<br />
-rw&#8212;x&#8212;<br />
chmod 611<br />
-rw&#8212;x&#8211;x<br />
chmod 612<br />
-rw&#8212;x-w-<br />
chmod 613<br />
-rw&#8212;x-wx<br />
chmod 614<br />
-rw&#8212;xr&#8211;<br />
chmod 615<br />
-rw&#8212;xr-x<br />
chmod 616<br />
-rw&#8212;xrw-<br />
chmod 617<br />
-rw&#8212;xrwx<br />
chmod 620<br />
-rw&#8211;w&#8212;-<br />
chmod 621<br />
-rw&#8211;w&#8212;x<br />
chmod 622<br />
-rw&#8211;w&#8211;w-<br />
chmod 623<br />
-rw&#8211;w&#8211;wx<br />
chmod 624<br />
-rw&#8211;w-r&#8211;<br />
chmod 625<br />
-rw&#8211;w-r-x<br />
chmod 626<br />
-rw&#8211;w-rw-<br />
chmod 627<br />
-rw&#8211;w-rwx<br />
chmod 630<br />
-rw&#8211;wx&#8212;<br />
chmod 631<br />
-rw&#8211;wx&#8211;x<br />
chmod 632<br />
-rw&#8211;wx-w-<br />
chmod 633<br />
-rw&#8211;wx-wx<br />
chmod 634<br />
-rw&#8211;wxr&#8211;<br />
chmod 635<br />
-rw&#8211;wxr-x<br />
chmod 636<br />
-rw&#8211;wxrw-<br />
chmod 637<br />
-rw&#8211;wxrwx<br />
chmod 640<br />
-rw-r&#8212;&#8211;<br />
chmod 641<br />
-rw-r&#8212;-x<br />
chmod 642<br />
-rw-r&#8212;w-<br />
chmod 643<br />
-rw-r&#8212;wx<br />
chmod 644<br />
-rw-r&#8211;r&#8211;<br />
chmod 645<br />
-rw-r&#8211;r-x<br />
chmod 646<br />
-rw-r&#8211;rw-<br />
chmod 647<br />
-rw-r&#8211;rwx<br />
chmod 650<br />
-rw-r-x&#8212;<br />
chmod 651<br />
-rw-r-x&#8211;x<br />
chmod 652<br />
-rw-r-x-w-<br />
chmod 653<br />
-rw-r-x-wx<br />
chmod 654<br />
-rw-r-xr&#8211;<br />
chmod 655<br />
-rw-r-xr-x<br />
chmod 656<br />
-rw-r-xrw-<br />
chmod 657<br />
-rw-r-xrwx<br />
chmod 660<br />
-rw-rw&#8212;-<br />
chmod 661<br />
-rw-rw&#8212;x<br />
chmod 662<br />
-rw-rw&#8211;w-<br />
chmod 663<br />
-rw-rw&#8211;wx<br />
chmod 664<br />
-rw-rw-r&#8211;<br />
chmod 665<br />
-rw-rw-r-x<br />
chmod 666<br />
-rw-rw-rw-<br />
chmod 667<br />
-rw-rw-rwx<br />
chmod 670<br />
-rw-rwx&#8212;<br />
chmod 671<br />
-rw-rwx&#8211;x<br />
chmod 672<br />
-rw-rwx-w-<br />
chmod 673<br />
-rw-rwx-wx<br />
chmod 674<br />
-rw-rwxr&#8211;<br />
chmod 675<br />
-rw-rwxr-x<br />
chmod 676<br />
-rw-rwxrw-<br />
chmod 677<br />
-rw-rwxrwx<br />
chmod 700<br />
-rwx&#8212;&#8212;<br />
chmod 701<br />
-rwx&#8212;&#8211;x<br />
chmod 702<br />
-rwx&#8212;-w-<br />
chmod 703<br />
-rwx&#8212;-wx<br />
chmod 704<br />
-rwx&#8212;r&#8211;<br />
chmod 705<br />
-rwx&#8212;r-x<br />
chmod 706<br />
-rwx&#8212;rw-<br />
chmod 707<br />
-rwx&#8212;rwx<br />
chmod 710<br />
-rwx&#8211;x&#8212;<br />
chmod 711<br />
-rwx&#8211;x&#8211;x<br />
chmod 712<br />
-rwx&#8211;x-w-<br />
chmod 713<br />
-rwx&#8211;x-wx<br />
chmod 714<br />
-rwx&#8211;xr&#8211;<br />
chmod 715<br />
-rwx&#8211;xr-x<br />
chmod 716<br />
-rwx&#8211;xrw-<br />
chmod 717<br />
-rwx&#8211;xrwx<br />
chmod 720<br />
-rwx-w&#8212;-<br />
chmod 721<br />
-rwx-w&#8212;x<br />
chmod 722<br />
-rwx-w&#8211;w-<br />
chmod 723<br />
-rwx-w&#8211;wx<br />
chmod 724<br />
-rwx-w-r&#8211;<br />
chmod 725<br />
-rwx-w-r-x<br />
chmod 726<br />
-rwx-w-rw-<br />
chmod 727<br />
-rwx-w-rwx<br />
chmod 730<br />
-rwx-wx&#8212;<br />
chmod 731<br />
-rwx-wx&#8211;x<br />
chmod 732<br />
-rwx-wx-w-<br />
chmod 733<br />
-rwx-wx-wx<br />
chmod 734<br />
-rwx-wxr&#8211;<br />
chmod 735<br />
-rwx-wxr-x<br />
chmod 736<br />
-rwx-wxrw-<br />
chmod 737<br />
-rwx-wxrwx<br />
chmod 740<br />
-rwxr&#8212;&#8211;<br />
chmod 741<br />
-rwxr&#8212;-x<br />
chmod 742<br />
-rwxr&#8212;w-<br />
chmod 743<br />
-rwxr&#8212;wx<br />
chmod 744<br />
-rwxr&#8211;r&#8211;<br />
chmod 745<br />
-rwxr&#8211;r-x<br />
chmod 746<br />
-rwxr&#8211;rw-<br />
chmod 747<br />
-rwxr&#8211;rwx<br />
chmod 750<br />
-rwxr-x&#8212;<br />
chmod 751<br />
-rwxr-x&#8211;x<br />
chmod 752<br />
-rwxr-x-w-<br />
chmod 753<br />
-rwxr-x-wx<br />
chmod 754<br />
-rwxr-xr&#8211;<br />
chmod 755<br />
-rwxr-xr-x<br />
chmod 756<br />
-rwxr-xrw-<br />
chmod 757<br />
-rwxr-xrwx<br />
chmod 760<br />
-rwxrw&#8212;-<br />
chmod 761<br />
-rwxrw&#8212;x<br />
chmod 762<br />
-rwxrw&#8211;w-<br />
chmod 763<br />
-rwxrw&#8211;wx<br />
chmod 764<br />
-rwxrw-r&#8211;<br />
chmod 765<br />
-rwxrw-r-x<br />
chmod 766<br />
-rwxrw-rw-<br />
chmod 767<br />
-rwxrw-rwx<br />
chmod 770<br />
-rwxrwx&#8212;<br />
chmod 771<br />
-rwxrwx&#8211;x<br />
chmod 772<br />
-rwxrwx-w-<br />
chmod 773<br />
-rwxrwx-wx<br />
chmod 774<br />
-rwxrwxr&#8211;<br />
chmod 775<br />
-rwxrwxr-x<br />
chmod 776<br />
-rwxrwxrw-<br />
chmod 777<br />
-rwxrwxrwx</p>
]]></content:encoded><description>chmod 0 &amp;#8212;&amp;#8212;&amp;#8212;- chmod 1 &amp;#8212;&amp;#8212;&amp;#8212;x chmod 2 &amp;#8212;&amp;#8212;&amp;#8211;w- chmod 3 &amp;#8212;&amp;#8212;&amp;#8211;wx chmod 4 &amp;#8212;&amp;#8212;-r&amp;#8211; chmod 5 &amp;#8212;&amp;#8212;-r-x chmod 6 &amp;#8212;&amp;#8212;-rw- chmod 7 &amp;#8212;&amp;#8212;-rwx chmod 10 &amp;#8212;&amp;#8212;x&amp;#8212; chmod 11 &amp;#8212;&amp;#8212;x&amp;#8211;x chmod 12 &amp;#8212;&amp;#8212;x-w- chmod 13 &amp;#8212;&amp;#8212;x-wx chmod 14 &amp;#8212;&amp;#8212;xr&amp;#8211; chmod 15 &amp;#8212;&amp;#8212;xr-x chmod 16 &amp;#8212;&amp;#8212;xrw- chmod 17 &amp;#8212;&amp;#8212;xrwx chmod 20 &amp;#8212;&amp;#8211;w&amp;#8212;- chmod 21 &amp;#8212;&amp;#8211;w&amp;#8212;x chmod [&amp;#8230;]</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noemail@noemail.org (The eHermit)</author></item><item><title>How to create a WordPress compatible slug in MySQL</title><link>https://thecodecave.com/how-to-create-a-wordpress-compatible-slug-in-mysql/</link><category>Random thoughts</category><category>WordPress</category><pubDate>Tue, 15 Mar 2016 22:44:05 GMT</pubDate><guid isPermaLink="false">https://thecodecave.com/?p=5297</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Sometimes it is convenient to import terms or posts into a WordPress database.  When you do, you may need to create a &#8216;slug&#8217; column. To do this, I&#8217;ve modified a user defined function I found on StackOverflow or some similar site (possibly here: http://stackoverflow.com/questions/5409831/mysql-stored-function-to-create-a-slug/5410316 ).  That version had some bugs. So I fixed them.</p>
<p>Here is my final script to create the UDF slugify.</p>
<p><strong>Usage:</strong><em> select slugify(name), name from externaldata;</em></p>
<p>&nbsp;</p>
<blockquote><p>CREATE DEFINER=`root`@`localhost` FUNCTION `slugify`(`dirty_string` VARCHAR(200)) RETURNS varchar(200) CHARSET latin1<br />
DETERMINISTIC<br />
BEGIN<br />
DECLARE x, y , z Int;<br />
Declare temp_string, allowed_chars, new_string VarChar(200);<br />
Declare is_allowed Bool;<br />
Declare c, check_char VarChar(1);</p>
<p>set allowed_chars = &#8220;abcdefghijklmnopqrstuvwxyz0123456789-&#8220;;<br />
set temp_string = lower(dirty_string);</p>
<p>Select temp_string Regexp(&#8216;&amp;&#8217;) Into x;<br />
If x = 1 Then<br />
Set temp_string = replace(temp_string, &#8216;&amp;&#8217;, &#8216; and &#8216;);<br />
End If;</p>
<p>Select temp_string Regexp(&#8216;[^a-z0-9]+&#8217;) into x;<br />
If x = 1 then<br />
set z = 1;<br />
While z &lt;= Char_length(temp_string) Do<br />
Set c = Substring(temp_string, z, 1);<br />
Set is_allowed = False;<br />
Set y = 1;<br />
Inner_Check: While y &lt;= Char_length(allowed_chars) Do<br />
If (strCmp(ascii(Substring(allowed_chars,y,1)), Ascii(c)) = 0) Then<br />
Set is_allowed = True;<br />
Leave Inner_Check;<br />
End If;<br />
Set y = y + 1;<br />
End While;<br />
If is_allowed = False Then<br />
Set temp_string = Replace(temp_string, c, &#8216;-&#8216;);<br />
End If;</p>
<p>set z = z + 1;<br />
End While;<br />
End If;</p>
<p>Select temp_string Regexp(&#8220;^-|-$|'&#8221;) into x;<br />
If x = 1 Then<br />
Set temp_string = Replace(temp_string, &#8220;&#8216;&#8221;, &#8221;);<br />
Set z = Char_length(temp_string);<br />
Set y = Char_length(temp_string);<br />
Dash_check: While z &gt; 1 Do<br />
If Strcmp(SubString(temp_string, -1, 1), &#8216;-&#8216;) = 0 Then<br />
Set temp_string = Substring(temp_string,1, y-1);<br />
Set y = y &#8211; 1;<br />
Else<br />
Leave Dash_check;<br />
End If;<br />
Set z = z &#8211; 1;<br />
End While;<br />
End If;</p>
<p>Repeat<br />
Select temp_string Regexp(&#8220;&#8211;&#8220;) into x;<br />
If x = 1 Then<br />
Set temp_string = Replace(temp_string, &#8220;&#8211;&#8220;, &#8220;-&#8220;);<br />
End If;<br />
Until x &lt;&gt; 1 End Repeat;</p>
<p>Return temp_string;<br />
END</p></blockquote>
]]></content:encoded><description>Sometimes it is convenient to import terms or posts into a WordPress database.  When you do, you may need to create a &amp;#8216;slug&amp;#8217; column. To do this, I&amp;#8217;ve modified a user defined function I found on StackOverflow or some similar site (possibly here: http://stackoverflow.com/questions/5409831/mysql-stored-function-to-create-a-slug/5410316 ).  That version had some bugs. So I fixed them. Here is [&amp;#8230;]</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noemail@noemail.org (The eHermit)</author></item><item><title>Help Me with Discussing Banner Sizes for Responsive Sites</title><link>https://thecodecave.com/help-me-with-discussing-banner-sizes-for-responsive-sites/</link><category>Random thoughts</category><pubDate>Tue, 8 Dec 2015 20:42:15 GMT</pubDate><guid isPermaLink="false">https://thecodecave.com/?p=5286</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>I posted sent this to a client asking about what the right banner image size is for a #WordPress site. Where am I off and could have improved it?</p>
<p>[..]<br />
So when creating custom headers for sites that are responsive and will be seen on different sizes, there are really three basic approaches:</p>
<p>1. Resizing/Scaling &#8211; The whole image is always shown, but it resizes smaller on smaller screens. The end result of this is that the detail of the the image is lots and titles that are now 1/4 the original size and are unreadable.</p>
<p>2. Centered &#8211; Allows for a single image to be used that can be as wide enough for a large screen, but only the middle is shown. This means that the most important info, like the title, has to be in the middle 320 pixels. It will also result in Google yelling at you because you are serving a very wide image on phones with a very limited width screen. A variance of this is left justified with the same results.</p>
<p>3. Multiple images &#8211; Based upon the size of the screen, the best image is displayed to the reader. This can be combined with #2 to cover multiple dimensions with less of a penalty from really wide images.</p>
<p>As with everything else, the answer that involves the most work, is the best answer. So #3 is best way to go.</p>
<p>With your last image, I created a three images (attached) that had the spirit of the first image. The first was just resized to fit the 1280 width screen.</p>
<p>The common sizes are: (http://bit.ly/1IAL98z)<br />
320 for iphone 3&amp;4,<br />
768 for ipads,<br />
1080 new tablets,<br />
1280 for desktops &amp; newer</p>
<p>You could go NUTS creating images for all the different dimensions. Take a look at the second article in the links below and you can see how many &#8220;common&#8221; breakpoints there are. If you create a site with three banners 320, 768, 1280, I think that covers most of the basis, especially if the readable content is mostly centered and can fall off the edges without any loss of message.</p>
<p>Some good articles:<br />
http://www.metaltoad.com/blog/device-chart-for-analytics-driven-responsive-web-design-planning</p>
<blockquote class="wp-embedded-content" data-secret="ZumHlb3WWl"><p><a href="https://responsivedesign.is/develop/browser-feature-support/media-queries-for-common-device-breakpoints/">media queries for common device breakpoints</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://responsivedesign.is/develop/browser-feature-support/media-queries-for-common-device-breakpoints/embed/#?secret=ZumHlb3WWl" data-secret="ZumHlb3WWl" width="600" height="338" title="&#8220;media queries for common device breakpoints&#8221; &#8212; Responsive Web Design" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe><br />
https://developers.google.com/web/fundamentals/design-and-ui/responsive/fundamentals/how-to-choose-breakpoints#pick-major-breakpoints-by-starting-small-then-working-up</p>
<blockquote class="wp-embedded-content" data-secret="eLuUygy1nb"><p><a href="https://responsivedesign.is/articles/why-you-dont-need-device-specific-breakpoints/">Why you don’t need device specific breakpoints</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://responsivedesign.is/articles/why-you-dont-need-device-specific-breakpoints/embed/#?secret=eLuUygy1nb" data-secret="eLuUygy1nb" width="600" height="338" title="&#8220;Why you don’t need device specific breakpoints&#8221; &#8212; Responsive Web Design" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
]]></content:encoded><description>I posted sent this to a client asking about what the right banner image size is for a #WordPress site. Where am I off and could have improved it? [..] So when creating custom headers for sites that are responsive and will be seen on different sizes, there are really three basic approaches: 1. Resizing/Scaling [&amp;#8230;]</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noemail@noemail.org (The eHermit)</author></item><item><title>How do you split a text field/textarea by line breaks?</title><link>https://thecodecave.com/how-do-you-split-a-text-fieldtextarea-by-line-breaks/</link><category>Random thoughts</category><pubDate>Wed, 30 Sep 2015 04:57:15 GMT</pubDate><guid isPermaLink="false">https://thecodecave.com/?p=5269</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Sometimes you want to provide a simple way for users to enter multiple values.  Perhaps the simplest way for the user is to understand is allow them to enter new values on each line.  Historically that&#8217;s how Internet Explorer allowed you to configure multiple home pages: 1 per line. It&#8217;s a tested method that works.</p>
<p>However, how do you then process the information?  There are lots of possiblitities, however I prefer an answer I found was posted back in 2011: Use preg_split().</p>
<pre class="lang-php prettyprint prettyprinted"><code><span class="pln">preg_split</span><span class="pun">( </span><span class="str">'/\r\n|[\r\n]/'</span><span class="pun">,</span><span class="pln"> $_POST</span><span class="pun">[ </span><span class="str">'yourtextarea' </span><span class="pun">], PREG_SPLIT_NO_EMPTY )</span></code></pre>
<p>By using regex, this function will handle entries from various platforms. You don&#8217;t need to worry about whether is just a carriage return or just a linefeed or even both at the end of a line.  The split is handled nicely and you get an array returned. It will even, by adding an optional third parameter, ignore any blank lines.  Once you have your value returned, you can write the array out to an option record, or process it however you like.</p>
<p>Once you have the array loaded from your DB, how do you split it into multiple lines again? That&#8217;s simple: Use implode().</p>
<pre class="lang-php prettyprint prettyprinted"><code><span class="pln">implode</span><span class="pun">( </span><span class="str">"\n"</span><span class="pun">, </span><span class="pln"> $myarray</span><span class="pun"> );</span></code></pre>
<p>Hope that helps someone!</p>
]]></content:encoded><description>Sometimes you want to provide a simple way for users to enter multiple values.  Perhaps the simplest way for the user is to understand is allow them to enter new values on each line.  Historically that&amp;#8217;s how Internet Explorer allowed you to configure multiple home pages: 1 per line. It&amp;#8217;s a tested method that works. However, how [&amp;#8230;]</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noemail@noemail.org (The eHermit)</author></item></channel></rss>