Find:
:(\w+)[\s]+=>[\s]+
Replace:
$1:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/sprockets-server-monkeypatch-deny_phantomjs_ttf.rb | |
# Monkey patch under test environment that prevents PhantomJS on OSX | |
# from crashing when dealing with TTF webfonts. | |
# Note: depending on your setup, it's likely that the RUBY_PLATFORM | |
# is not actually relevant for server - it's the UA that crashes. | |
if Rails.env.test? # && RUBY_PLATFORM =~ /darwin/ | |
module Sprockets::Server | |
def call_with_env_instance_var(env) | |
@env = env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this allows culerity to wait until all ajax requests have finished | |
jQuery(function($) { | |
var original_ajax = $.ajax; | |
var count_down = function(callback) { | |
return function() { | |
try { | |
if(callback) { | |
callback.apply(this, arguments); | |
}; | |
} catch(e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
Event = Backbone.Model.extend() | |
Events = Backbone.Collection.extend({ | |
Model: Event, | |
url : 'events' | |
}) | |
EventsView = Backbone.View.extend({ | |
initialize: -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Copyright (c) 2008, Christian Mittendorf <christian.mittendorf@googlemail.com> | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
Redistributions of source code must retain the above copyright notice, this | |
list ofconditions and the following disclaimer. Redistributions in binary form | |
must reproduce the above copyright notice, this list of conditions and the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
init: function() { | |
var view = this; | |
var resizeHandler = function() { | |
view.rerender(); | |
}; | |
this.set('resizeHandler', resizeHandler); | |
$(window).bind('resize', this.get('resizeHandler')); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ | |
wget http://mmonit.com/monit/dist/binary/5.12/monit-5.12-linux-x64.tar.gz | |
tar zxf monit-5.12-linux-x64.tar.gz | |
cd monit-5.12/ | |
cp bin/monit /usr/bin/ | |
mkdir /etc/monit | |
touch /etc/monit/monitrc | |
chmod 0700 /etc/monit/monitrc | |
ln -s /etc/monit/monitrc /etc/monitrc | |
wget https://gist.githubusercontent.com/gaurish/964456aa08c9fa2e43ee/raw/1aa107e62ecaaa2dacfdb61a12f13efb6f15005b/monit -P /etc/init.d/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/locales/en.yml | |
en: | |
exception: | |
show: | |
not_found: | |
title: "Not Found" | |
description: "The page you were looking for does not exists." | |
internal_server_error: | |
title: "Internal Server Error" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A class-based template for jQuery plugins in Coffeescript | |
# | |
# $('.target').myPlugin({ paramA: 'not-foo' }); | |
# $('.target').myPlugin('myMethod', 'Hello, world'); | |
# | |
# Check out Alan Hogan's original jQuery plugin template: | |
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template | |
# | |
(($, window) -> |
In order to use asset pipeline available for static error pages (like 404.html), a few steps are required
-
Move static pages from /public into /app/assets
(eg: public/422.html → app/assets/html/422.html.erb)
-
Add html directory to the asset pipeline
-
Update exceptions middleware to understand assets with digests
OlderNewer