Skip to content

Instantly share code, notes, and snippets.

@little9
little9 / thing.js
Created October 27, 2015 15:30
Object Literal Skeleton
var Thing = {
settings : {
},
strings : {
},
init : {
},
bindUiActions : {
},
customFunction : function() {
{
"coordinates": null,
"created_at": "Thu Oct 21 16:02:46 +0000 2010",
"favorited": false,
"truncated": false,
"id_str": "28039652140",
"entities": {
"urls": [
{
"expanded_url": null,
@little9
little9 / rails-checklist.md
Last active August 29, 2015 14:19
Rails Passenger Deployment Checklist
  • Here's an example Apache config (don't use friendly error pages in production):
Alias /aptrust-tracking /var/www/html/aptrust-tracking/public
    <Location /aptrust-tracking>
        PassengerBaseURI /aptrust-tracking
        PassengerAppRoot /var/www/html/aptrust-tracking
        PassengerFriendlyErrorPages on
    </Location>
 
@little9
little9 / gist:4cdd617cc254424d5672
Last active August 29, 2015 14:01
CHC check exceptions
// Extend the Javascript Date() object to use full month names
Date.prototype.getMonthName = function(lang) {
lang = lang && (lang in Date.locale) ? lang : 'en';
return Date.locale[lang].month_names[this.getMonth()];
};
Date.prototype.getMonthNameShort = function(lang) {
lang = lang && (lang in Date.locale) ? lang : 'en';
return Date.locale[lang].month_names_short[this.getMonth()];