{"id":2459,"date":"2015-05-27T17:12:03","date_gmt":"2015-05-27T17:12:03","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=2459"},"modified":"2016-04-07T11:53:41","modified_gmt":"2016-04-07T11:53:41","slug":"web-developer-tips-collection-2-may-2015","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/web-developer-tips-collection-2-may-2015\/","title":{"rendered":"Web Developer Tips &#8211; Collection #2 (May 2015)"},"content":{"rendered":"<p>Let&#8217;s start it off with a great quote: &#8220;To understand recursion, you first need to understand recursion&#8221;<\/p>\n<p>Before I get to the tips, I thought I&#8217;d mention something that&#8217;s been irking me a little bit lately. Why do people minify server-side code!<\/p>\n<p>I absolutely love it when people provide assistance in the form of code samples. I would urge people to keep such examples &#8220;maxified&#8221;!<\/p>\n<p>Example:<\/p>\n<p>$test.=&#8217;test&#8217;;<\/p>\n<p>Why not<\/p>\n<p>$test .= &#8216;test&#8217;;<\/p>\n<p>Easier to read, right? Okay, enough of that &#8211; let&#8217;s see what I learned this month:<\/p>\n<ol>\n<li>I&#8217;ve used Amazon EC2 to setup 2 or 3 server instances this month. It&#8217;s been a positive experience, except for one really big thing:When I create a 32 GB volume, it only allocates 8GB of space for use on the drive. There&#8217;s a whole bag of tricks you can use to adjust your partitions (or whatever the actual process is) to use the full allocate space. But, I didn&#8217;t want to attempt this on a production server.\n<p>Lesson: \u00a0If you go with EC2, verify that your drive actually has the full amount of space allocated to it before you go to production!<\/p>\n<p><strong>Edit: I pieced together a solution in the snippet:<\/strong><br \/>\n<a href=\"https:\/\/www.sitekickr.com\/snippets\/linux\/resize-amazon-ec-linux-partition\">Linux Resize Amazon EC2 Linux Partition<\/a>\u00a0(really, I just logged my keystrokes)<\/li>\n<li>Get ready to grab an SSL certificate for all of your sites. It looks like HTTP\/2 will be limited to secure connections only.In addition, at the end of April 2015, Mozilla announced that it is officially deprecating the HTTP protocol.<\/li>\n<li>The #CSS :only-child and :only-of-type pseudo-classes aren&#8217;t well-known. But, they can be useful to call out single list elements if needed.<\/li>\n<li>The Google search spider can now execute and index JavaScript. So say goodbye to hiding elements with JavaScript.<\/li>\n<li>MySQL is working on an <a href=\"http:\/\/labs.mysql.com\/?id=3\">HTTP API<\/a>. This would allow you to query the database over HTTP\/HTTPS and get a JSON-formatted response.<\/li>\n<li>Need to make sure that your white text is visible when overlayed on any image. There&#8217;s a real quick CSS solution to add a single-pixel-width &#8220;stroke&#8221; to the text:\n<pre>text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;<\/pre>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s start it off with a great quote: &#8220;To understand recursion, you first need to understand recursion&#8221; Before I get to the tips, I thought&hellip;<\/p>\n","protected":false},"author":1,"featured_media":2456,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[262],"tags":[],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/2459"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=2459"}],"version-history":[{"count":4,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/2459\/revisions"}],"predecessor-version":[{"id":2469,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/2459\/revisions\/2469"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media\/2456"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=2459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=2459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=2459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}