<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>ASIM</title>
		<link>http://simanov.net</link>
		<description>RSS feed for ASIM</description>
		<atom:link href="http://simanov.net/feed" rel="self" type="application/rss+xml" />
																																											<item>
				<title>Extend Background SASS Mixin</title>
				<description><![CDATA[<p>Have you ever run into this problem? The footer is designed beautifully but you just don't have enough content in the body to push the stuff far enough down the page that the footer sits flush with the bottom of the browser (in desktop vieport)? Yea, I'm talking about that awkward white space right under your beautifully designed... design. </p>
<p>The whitespace that you love and defend, day in and day out, it just sits there. It sits there mocking all of your effort and energy in fighting for its right to exist. The right to party. This particular white space has no right to party. Much more it has no right to even exist. It just sits there shouting &quot;Hey! Look at me! Forget about that perfectly calculated, good looking, and fair design above me... I'M JUST HERE AND I'M SUPER HARD TO LOOK AWAY FROM!&quot; </p>
<p>Such an asshat.</p>
<p><strong>To illustrate:</strong></p>
<img src="../img/post/footer-bg.svg" />
<p><strong>Here's how I deal with it, and it's super simple:</strong></p>
<p>So you have your footer (add class or not, just use the same 'ol footer):</p>
<pre><code class="language-html">&lt;footer&gt;
...
&lt;/footer&gt;</code></pre>
<p>Let's make sure that we have the box shadow mixin already in your stuff:</p>
<pre><code class="language-scss">// Box Shadow
// 
@mixin box-shadow($value) {
    -webkit-box-shadow: $value;
    -moz-box-shadow: $value;
    box-shadow: $value;
}</code></pre>
<p>Here's the mixin for our extended background:</p>
<pre><code class="language-scss">// Extend the background of the bottom most element (footer) to eliminate
// white space if content is not sufficient to fill the viewport.
//
@mixin bgExtend($color) {
  &amp;::after {
    content: "";
    @include box-shadow (0px 500px 0px 500px $color);
    display: block;
    width: 100%;
    position: absolute;
  }
}</code></pre>
<p>And in your main scss:</p>
<pre><code class="language-scss">footer {
  @include bgExtend(#000);
}</code></pre>
<p>This simple mixin is how I get rid of that entitled white space at the bottom of my pages, if you have a better solution please let me know!  </p>
<p>Thanks for reading, until I write stuff &amp; things again, <a href="http://i.imgur.com/yjc1Ykq.gif" target="_blank">I'll catch you on the flip side.</a></p>]]></description>
				<link>http://simanov.net/blog/2017-04-11-sass-mixin-extend-bg</link>
				<pubDate>Tue, 11 Apr 2017 00:00:00 -0500</pubDate>
				<guid>http://simanov.net/blog/2017-04-11-sass-mixin-extend-bg</guid>
			</item>
											<item>
				<title>Happy New Date Range!</title>
				<description><![CDATA[<p>Sometimes you make a mistake. Sometimes you make that same mistake in more than one place. Sometimes you make an amateur mistake that you wish that you would have caught before starting a New Year selebration... You just simply made a mental error months ago that resulted in a week of appology and 15 minutes of office hours fixing the one thing you were so sure that you had solved once and for all. Sometimes you just messed up and will forever remember that &quot;sometimes&quot;. </p>
<p>January 1, 2017 was that &quot;sometimes&quot; for me. I did indeed make my way into the office to correct that problem this very day. I did spend much of the following week explaining what had happened and what I failed to do over and over again to my collegues. Lastly, I'm still left wondering how I let this one slip through. Nevertheless, I am the one who <a href="http://i.imgur.com/daLlJjg.jpg" target="_blank">&quot;done goofed&quot;</a>. I learned from my mistake and so should you.</p>
<p>When you have a date range that spans over a year change you should, most definitely, remember to make an exception for that. The problem is simple: </p>
<ul>
<li>Show specific stuff between the month of November and the month of February. </li>
<li>Don't show that specific stuff any other month.</li>
</ul>
<p>Your initial date range is probably something like this:</p>
<pre><code class="language-markup">10/01/yyyy - 03/01/yyyy</code></pre>
<pre><code class="language-js">// Define our variables
// 
// current date and current year
var currentDate = new Date(); 
var currentYear = new Date().getFullYear(); 
// min and max variables
var minDate = new Date('10/31/' + currentYear); 
var maxDate = new Date('03/01/' + currentYear);

// Set our Date Range
//
// start of range 
if (currentDate &gt;= minDate &amp;&amp; currentDate &lt;= maxDate ){ 
  $("#condition1").show(); 
  $("#condition2").hide();  
// end of range  
} else { 
  $("#condition1").hide(); 
  $("#condition2").show(); 
}</code></pre>
<p>That's all well and good if the months fall in the same year but they don't so you simply adjust for the next year as follows:</p>
<pre><code class="language-markup">10/01/yyyy - 03/01/yyyy+1</code></pre>
<pre><code class="language-js">// Define our variables
//
// current date and current year
var currentDate = new Date(); 
var currentYear = new Date().getFullYear();
// next year variable 
var nextYear = new Date().getFullYear()+1;
// min and max variables 
var minDate = new Date('10/31/' + currentYear); 
var maxDate = new Date('03/01/' + nextYear);

// Set our Date Range
// 
// start of range 
if (currentDate &gt;= minDate &amp;&amp; currentDate &lt;= maxDate ){ 
  $("#condition1").show(); 
  $("#condition2").hide(); 
// end of range   
} else { 
  $("#condition1").hide(); 
  $("#condition2").show(); 
}</code></pre>
<p><a href="https://nkayesel.files.wordpress.com/2013/06/no-its-not.gif?w=500&h=281" target="_blank">It's not that simple</a> because the months falling in the <em>next</em> year are now out of range. Initially I failed to do that simple step and stopped at adding &quot;+1&quot; to the date range causing the &quot;specific stuff&quot; to not show on the first of the new year. Enter the exception:</p>
<pre><code class="language-markup">01/01/yyyy - 03/01/yyyy</code></pre>
<pre><code class="language-js">// Define our variables
//
// current date and current year
var currentDate = new Date(); 
var currentYear = new Date().getFullYear();
// next year variable  
var nextYear = new Date().getFullYear()+1;
// min and max variables  
var minDate = new Date('10/31/' + currentYear + ', 4:00:00 PM'); 
var maxDate = new Date('03/01/' + nextYear);
// exception min and max variables
var minDateException = new Date('01/01/' + currentYear); 
var maxDateException = new Date('03/01/' + currentYear); 

// Set our Date Range
//
// start of range  
if (currentDate &gt;= minDate &amp;&amp; currentDate &lt;= maxDate ){ 
  $("#condition1").show(); 
  $("#condition2").hide();  
// the exception to our range
} else if (currentDate &gt;= minDateException &amp;&amp; currentDate &lt;= maxDateException ){ 
  $("#condition1").show(); 
  $("#condition2").hide(); 
// end of range 
} else { 
  $("#condition1").hide(); 
  $("#condition2").show(); 
}</code></pre>
<p>We, at this point, accounted for that but the month of February is a tricky one with all that <a href="http://i.imgur.com/uLVEt.gif" target="_blank">Leap Year business</a>. Lets modify our variables and try again:</p>
<pre><code class="language-markup">10/01/yyyy - (03/01/yyyy+1)-1
01/01/yyyy - (03/01/yyyy)-1</code></pre>
<pre><code class="language-js">// Define our variables
// 
// current date and current year
var currentDate = new Date(); 
var currentYear = new Date().getFullYear();
// next year variable  
var nextYear = new Date().getFullYear()+1;
// min and max variables   
var minDate = new Date('10/31/' + currentYear); 
var maxDate = new Date('03/01/' + nextYear);
// exception min and max variables
var minDateException = new Date('01/01/' + currentYear); 
var maxDateException = new Date('03/01/' + currentYear); 

// Modify our maxDate and maxDateException variables 
// 
maxDate.setDate(maxDate.getDate() - 1);
maxDateException.setDate(maxDateException.getDate() - 1);

// Set our Date Range
// 
// start of range 
if (currentDate &gt;= minDate &amp;&amp; currentDate &lt;= maxDate ){ 
  $("#condition1").show(); 
  $("#condition2").hide(); 
// the exception to our range 
} else if (currentDate &gt;= minDateException &amp;&amp; currentDate &lt;= maxDateException ){ 
  $("#condition1").show(); 
  $("#condition2").hide();
// end of range  
} else { 
  $("#condition1").hide(); 
  $("#condition2").show(); 
}</code></pre>
<p>Just as I thought that we had this all wrapped up and ready to go I remembered that there was yet another <a href="http://i.imgur.com/e4Iz3iP.jpg" target="_blank">small step to take into account</a>: we want the date range to begin at a specific date <em>and</em> time. Thus, here is our final code:</p>
<pre><code class="language-js">// Define our variables
// 
// current date and current year
var currentDate = new Date(); 
var currentYear = new Date().getFullYear();
// next year variable  
var nextYear = new Date().getFullYear()+1;
// min and max variables  
// add specific time when we want our date range to begin on 
var minDate = new Date('10/31/' + currentYear + ', 4:00:00 PM'); 
var maxDate = new Date('03/01/' + nextYear);
// exception min and max variables
var minDateException = new Date('01/01/' + currentYear); 
var maxDateException = new Date('03/01/' + currentYear); 

// Modify our maxDate and maxDateException variables 
// 
maxDate.setDate(maxDate.getDate() - 1);
maxDateException.setDate(maxDateException.getDate() - 1);

// Set our Date Range
// 
// start of range 
if (currentDate &gt;= minDate &amp;&amp; currentDate &lt;= maxDate ){ 
  $("#condition1").show(); 
  $("#condition2").hide();
// the exception to our range  
} else if (currentDate &gt;= minDateException &amp;&amp; currentDate &lt;= maxDateException ){ 
  $("#condition1").show(); 
  $("#condition2").hide(); 
// end of range 
} else { 
  $("#condition1").hide(); 
  $("#condition2").show(); 
}</code></pre>
<p>To wrap it all up here is a pen that illustrates how our final date range script works. Adjust the date and/or time in the <span class="inline">testDate</span> variable to show and hide the <span class="inline">condition#</span> divs. For testing purposes I made sure to write some of the key variables to the document below the divs.</p>
<p data-height="300" data-theme-id="0" data-slug-hash="EZVKwE" data-default-tab="js,result" data-user="asimanov" data-embed-version="2" data-pen-title="Date Range with Exception" class="codepen">See the Pen <a href="http://codepen.io/asimanov/pen/EZVKwE/">Date Range with Exception</a> by Asim (<a href="http://codepen.io/asimanov">@asimanov</a>) on <a href="http://codepen.io">CodePen</a>.</p>
<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>
<p>&quot;This is simple stuff folks! Make sure that you test and code review before and after releasing any new product and/or update.&quot; &mdash; said everyone who's ever failed to follow their own advice.</p>
<p>Thanks for reading, until I write stuff &amp; things again, <a href="http://i.imgur.com/yjc1Ykq.gif" target="_blank">I'll catch you on the flip side.</a></p>]]></description>
				<link>http://simanov.net/blog/2017-01-13-happy-date-range</link>
				<pubDate>Fri, 13 Jan 2017 00:00:00 -0600</pubDate>
				<guid>http://simanov.net/blog/2017-01-13-happy-date-range</guid>
			</item>
											<item>
				<title>Post Entry Process - Brief History</title>
				<description><![CDATA[<p>Back in the day, like way back when the iPhone gen 1 was announced and Lucky Strike cigarettes (&quot;It's Toasted&quot;) were still sold in the USA, I started to experiment with writing my thoughts and things online. Back then we had things like MySpace and Facebook where folks would write long updates in a &quot;short-format&quot; blog post... Remember Xanga? If you were a creative type there was also DeviantArt and eventually Flickr took to the scene as the proto-hipster place for photogs. </p>
<p>All of those &quot;free&quot; platforms were great for exploration and the occasional moaning about the myriad of mundane and annoying crap that no one really cares about; However,  you still wrote that garbage because it got likes, attention, and occasional comments of support and comradery. If you wanted more control of your platform you had to think a little harder past your hotmail address and a seriously weak password. Did I mention that there were also free forum solutions like ProBoards? </p>
<p>Now that I covered most of the legacy social communication solutions let's take a look at the age of blogging. The giant of that domain started to emerge in the midst of Mambo and Joomla (and eventually Drupal) slapping contest, which were the first popular and fully functioning php based content management systems. I'm talking about Wordpress. WP was a simple, flexible, blog-first CMS. Downloading, deploying, and customizing WP installations wasn't exactly a cake-walk in the beginning but with a little know-how and research it was actually quite easy compared to its predecessors. At some point if you had a shared hosting account with BlueHost (I still do, it's great), or another major shared web hosting provider, your Control Panel received an update that allowed you to install WP with a single click, how awesome is that?! </p>
<p>It is, indeed, very much the &quot;bees-knees&quot; but it also ushered in the age of php-based vulnerabilities and WP bloat. Now we have an ocean of WP blogs, some real and a legion of abandoned and never updated installs, alongside WP hosted accounts (basically more of the same thing but franchised). With well deserved accolades and attention came a whirlwind of php developers building anything from social media plugins to full on professional and pricey themes. The Achilles' heel of this wonderful software is, and always will be, security. </p>
<p>As anyone can expect popular software receives a lot of good and equally bad attention. The good stuff was in the aforementioned plugin and theme development. Anything that you could ever need or want was probably already developed, all you have to do is search for it in the WP plugin directory. What was also plentiful and already developed were security hacks and code made specifically to exploit the myriad of vulnerabilities plaguing the system. Right. There. In. The. Plugins. Major and intermittent versions of WP kept on rolling out in an attempt to plug the onslaught of security leaks but two main facts remain constant to this day: thousands of rogue and abandoned installs remain unchanged, WP remains the most targeted CMS in terms of security and brute force attacks. </p>
<p>It's important to note that I'm not running a WP smear campaign. I have worked with and maintained WP installs in the past and find the CMS actually quite useful and user friendly. WP is hands down the easiest and most common-sense solution for projects/websites that are meant to be put up quickly and have multiple contributors right away, or in a sitution that demands a quick blog solution RIGHT NOW (WP target audience). This article is part 1 of my post entry and automation process, it has nothing to do with WordPress aside from highlighting the popular blogging platform and the number one reason that I abandoned it. </p>
<p>Next up, &quot;Post Entry Process - The Setup&quot;</p>
<p>For more research concerning WP security woes:</p>
<ul><li><a href="https://wpvulndb.com/" target="_blank">Vulnerability tracker</a></li>
<li><a href="https://premium.wpmudev.org/blog/wordpress-security-exploits/" target="_blank">A brief history of security issues</a></li>
<li><a href="https://blog.vaultpress.com/2015/08/20/interview-with-wordpress-orgs-security-czar-nikolay-bachiyski/" target="_blank">Interview with WordPress.org's Security Czar, Nikolay Bashiyski</a></li>
<li><a href="https://wordpress.org/about/security/" target="_blank">WordPress white paper</a></li>
<li><a href="https://www.wordfence.com/learn/how-to-protect-yourself-from-wordpress-security-issues/" target="_blank">Protecting yourself</a></li>
</ul>
<p>Thanks for reading, until I write stuff &amp; things again, <a href="http://i.imgur.com/yjc1Ykq.gif" target="_blank">I'll catch you on the flip side.</a></p>]]></description>
				<link>http://simanov.net/blog/2016-12-16-post-entry-process-brief-history</link>
				<pubDate>Sun, 11 Dec 2016 00:00:00 -0600</pubDate>
				<guid>http://simanov.net/blog/2016-12-16-post-entry-process-brief-history</guid>
			</item>
						</channel>
</rss>