Skip to content

Instantly share code, notes, and snippets.

View scott-joe's full-sized avatar
🛠️
Tinkering

Scott Williams scott-joe

🛠️
Tinkering
View GitHub Profile
@scott-joe
scott-joe / Sort on object properties
Last active December 19, 2015 06:09
Sorts an array based on a property. Reversible.
//Based on http://jsfiddle.net/dFNva/1/
var events = [
{
event_name: "Recurring",
start_date_time: new Date('Fri May 17 2013 01:00:00 GMT-0400 (EDT)'),
rating: '4.1'
}, {
event_name: "Morning Dive",
start_date_time: new Date('Tue May 14 2013 02:00:00 GMT-0400 (EDT)'),
# implement minimal caching during site development
<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|js|css|pdf|swf|html|htm|txt)$">
Header set Cache-Control "max-age=5"
</FilesMatch>
# explicitly disable caching for scripts and other dynamic files
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
Header unset Cache-Control
</FilesMatch>