URL Redirects

Published on

There are five basic types of redirects: 300 multiple choices 301 permanent move when you take down a page when you move a page or entire site somewhere else when you point users to the original page when you take down duplicate content 302 temporary move when a page is temporarily unavailable when you want … Continue reading URL Redirects

GitHub Cheat Sheet

Published on

Checkout a remote branch Before you can start working locally on a remote branch, you need to fetch it as called out in answers below. To fetch a branch, you simply need to: git fetch origin This will fetch all of the remote branches for you. You can see the branches available for checkout with: … Continue reading GitHub Cheat Sheet

Useful Firefox Add-Ons

Published on

Recommended Firebug Essential developer tool Live HTTP Headers View HTTP headers of a page and while browsing. PageSpeed No longer available on Firefox. Chrome only. User Agent Switcher Adds a menu and a toolbar button to switch the user agent of a browser. User-Agent JS Fixer Extends the functionality of other User-Agent addons, allowing them … Continue reading Useful Firefox Add-Ons

AWS General Notes

Published on

Disk performance is measured in IOPS (Input/Output Per Second). Storage exists outside of compute resources. Storage Options Content Delivery Storage Gateway Elastic Block Service (EBS) – used for AWS EC2 instances General Purpose SS 3 IOPS; burstable to 3,000 IOPS Provisioned IOPS (for higher performance, like a database) 4,000 IOPS Magnetic 40 to 200 IOPS … Continue reading AWS General Notes

Web Analytics 2.0

Published on

Web Analytics 2.0 is: the analysis of qualitative and quantitative data from your website and the competition, to drive a continual improvement of the online experience that your customers, and potential customers have, which translates into your desired outcomes (online and offline). Google Analytics is capable of tracking user activity on a website, mobile website, … Continue reading Web Analytics 2.0

MySQL Joins

Published on

LEFT JOIN SELECT * FROM customers LEFT JOIN books ON customers.book_id = books.id RIGHT JOIN SELECT * FROM customers RIGHT JOIN books ON customers.book_id = books.id OUTER JOIN SELECT * FROM customers OUTER JOIN books ON customers.book_id = books.id INNER JOIN(or simply JOIN) SELECT * FROM customers JOIN books ON customers.book_id = books.id LEFT JOIN … Continue reading MySQL Joins

JavaScript: Age Validation Form

Published on

This form validates the date selected by the user is valid and that the user is at least the age of 18. (Note that it does not dynamically adjust the day select list based on the month and year selected.) HTML <form id=”age-validation-form” class=”form-inline” method=”POST”> <div class=”form-group”> <select name=”dob_month” id=”dob_month” class=”required form-control”> <option value=””>Month</option> <option … Continue reading JavaScript: Age Validation Form

JavaScript: Age Validator

Published on

function isOfAge(year, month, day, age) { age = age || 18; var mydate = new Date(); mydate.setFullYear(year, month-1, day); var currdate = new Date(); currdate.setFullYear(currdate.getFullYear() – age); if ((currdate – mydate) < 0) { return false; } return true; } References: Validate Age | CSS-Tricks