This file contains hidden or 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
class MyError < StandardError | |
attr_reader :my_attr1, :my_attr2 | |
# Usage examples: | |
# fail MyError.new | |
# fail MyError, "error message" | |
# fail MyError.new("error message") | |
# fail MyError.new(:my_attr1 => "hello", :my_attr2 => "world") | |
# fail MyError.new(:my_attr1 => "hello"), "error message" | |
# fail MyError.new(:message => "error message", :my_attr1 => "hello") |
This file contains hidden or 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
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
This file contains hidden or 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
window.App = Ember.Application.create | |
rootElement: '#container' | |
ApplicationController: Ember.ObjectController.extend() | |
ApplicationView: Ember.View.extend | |
templateName: 'application' | |
Router: Ember.Router.extend | |
root: Ember.Route.extend | |
home: Ember.Route.extend |
This file contains hidden or 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
! ~/.Xdefaults | |
! xhh config for terminals e.g. urxvt | |
! For the latest version, check | |
! http://github.com/cooky/dotfiles_archlinux/blob/master/.Xdefaults | |
! normal settings | |
Xft.dpi: 96 | |
Xft.antialias: true | |
Xft.rgba: rgb | |
Xft.hinting: true |
This file contains hidden or 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
import static ch.qos.logback.core.CoreConstants.LINE_SEPARATOR; | |
import org.apache.commons.lang.StringEscapeUtils; | |
import ch.qos.logback.classic.spi.ILoggingEvent; | |
import ch.qos.logback.core.pattern.Converter; | |
/** | |
* Extend the {@link ch.qos.logback.classic.html.HTMLLayout} to escape HTML content.<br/> | |
* TODO remove when the bug if fixed by logback. See http://jira.qos.ch/browse/LBCLASSIC-180 |
NewerOlder