Skip to content

Instantly share code, notes, and snippets.

@ianmurrays
ianmurrays / model_caching.coffee
Created November 15, 2012 00:52 — forked from rstacruz/model_caching.coffee
Backbone.js model caching
# ## Backbone model caching
# This is a simple solution to the problem "how do I make less requests to
# my server?".
#
# Whenever you need a model instance, this will check first if the same thing
# has been fetched before, and gives you the same instance instead of fetching
# the same data from the server again.
#
# Reusing the same instance also has the great side-effect of making your
# model changeable from one part of your code, with your changes being available
@ianmurrays
ianmurrays / fill-column-indicator.el
Created December 11, 2017 20:05
~/.emacs.d/elpa/fill-column-indicator-20170905.1008/fill-column-indicator.el
;;; fill-column-indicator.el --- Graphically indicate the fill column
;; Copyright (c) 2011-2014 Alp Aker
;; Author: Alp Aker <alp.tekin.aker@gmail.com>
;; Version: 1.89
;; Keywords: convenience
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
{
"type": "warning",
"html": true,
"message": "<i class=\"fa fa-warning\"></i> The message to display in <br><br> <strong>bold!!!</strong>",
"expires_at": 1526374267080
}
@ianmurrays
ianmurrays / deploy.rb
Created July 21, 2011 17:26
Runs test locally before deploying on capistrano.
set :test_log, "logs/capistrano.test.log"
namespace :deploy do
before 'deploy:update_code' do
puts "--> Running tests, please wait ..."
unless system "bundle exec rake > #{test_log} 2>&1" #' > /dev/null'
puts "--> Tests failed. Run `cat #{test_log}` to see what went wrong."
exit
else
puts "--> Tests passed"
@ianmurrays
ianmurrays / devise.es.yml
Created March 19, 2012 19:53
Devise 2.0 Spanish Locale
es:
errors:
messages:
expired: "ha expirado, por favor pide una nueva"
not_found: "no encontrado"
already_confirmed: "ya fue confirmada. Intenta ingresar."
not_locked: "no ha sido bloqueada"
not_saved:
one: "Ha habido 1 error:"
other: "Han habido %{count} errores:"