I hereby claim:
- I am rogeliog on github.
- I am rogeliog (https://keybase.io/rogeliog) on keybase.
- I have a public key ASCWRv3hVVvUM79InDyDTvCsmzYtbeMVuoyy2C5cSTG8FQo
To claim this, I am signing this object:
def replace_exception original_exception, new_exception | |
begin | |
yield | |
rescue original_exception | |
raise new_exception | |
end | |
end | |
class OtherException < Exception; end |
application_helper.rb | |
def avatar_url(user) | |
if user.avatar_url.present? | |
user.avatar_url | |
else | |
default_url = "#{root_url}images/guest.png" | |
gravatar_id = Digest::MD5.hexdigest(user.email.downcase) | |
"http://gravatar.com/avatar/#{gravatar_id}.png?s=48&d=#{CGI.escape(default_url)}" | |
end | |
end |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title><%= content_for?(:title) ? yield(:title) : "Awesomeness" %></title> | |
<%= csrf_meta_tags %> | |
<!-- Le HTML5 shim, for IE6-8 support of HTML elements --> | |
<!--[if lt IE 9]> |
$(function () { | |
//Color Stat UI component | |
var ColorStat = flight.component(function () { | |
this.updateColorStat = function (event, data) { | |
var count = parseInt(this.$node.text(), 10); | |
if (this.$node.data('color') == data.color) { | |
this.$node.text(count + 4); | |
} else { |
configure: creating cache auto/config.cache | |
checking whether make sets $(MAKE)... yes | |
checking for gcc... clang | |
checking whether the C compiler works... yes | |
checking for C compiler default output file name... a.out | |
checking for suffix of executables... | |
checking whether we are cross compiling... no | |
checking for suffix of object files... o | |
checking whether we are using the GNU C compiler... yes | |
checking whether clang accepts -g... yes |
/* | |
This is a minimal working example | |
*/ | |
import React, { Component } from 'react'; | |
import Filters from './Filters'; | |
import InputFilter from './InputFilter'; | |
import allMovies from './movies'; | |
class App extends Component { |
const r = new RegExp('^(?!.*\.js$).*$'); | |
it('Does not matches .js files', () => { | |
expect(r.test('dir/myFile.js')).toBeFalsy(); | |
expect(r.test('dir.ext/myFile.js')).toBeFalsy(); | |
expect(r.test('myFile.js')).toBeFalsy(); | |
}) | |
it('Matchs other extensions', () => { | |
expect(r.test('dir.something/myFile.other')).toBeTruthy(); |
I hereby claim:
To claim this, I am signing this object: