- http://www.errorify.com/ - source maps
- http://errorception.com/ - translate error messages to English
- http://www.exceptionhub.com/
- http://jserrlog.appspot.com/
- http://www.muscula.com/ - source maps, translate error messages to English
- https://www.airbrake.io/ - tracekit, source maps
- http://www.errorstack.com/
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
_watch = (prop, fn) -> | |
subs[prop] = [] unless subs[prop] | |
subs[prop].push fn | |
_notify = (prop, val) -> | |
if subs[prop] | |
subs[prop].forEach (cb) -> | |
cb val | |
_compare = (a, b) -> |
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
// underscore addon with sum, mean, median and nrange function | |
// see details below | |
_.mixin({ | |
// Return sum of the elements | |
sum : function(obj, iterator, context) { | |
if (!iterator && _.isEmpty(obj)) return 0; | |
var result = 0; | |
if (!iterator && _.isArray(obj)){ |
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
// The API accepts the page parameter and returns the pagination info in meta | |
{ | |
"messages": [ ... ], | |
"meta": { | |
"pagination": { | |
"total_pages": 3, | |
"current_page": 1, | |
"total_count": 55 | |
} |
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
# Public: A module to be mixed in another class with common methods to index | |
# records in ElasticSearch. | |
# | |
# The host object needs to respond to 'indexed_attributes', which will return | |
# an array of the attributes names to be indexed. | |
# | |
# It's also recommended to override the 'save?' method to make sure only | |
# records that match some specifications are indexed. | |
# | |
# The type used for the ElasticSearch index will be extracted from the name of |
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
// | |
// Make a few assumptions and add noise to latitude/longitude position | |
// Ex, console.log(jitter(-26.4853429150483, -49.072945734375, 5)); | |
// | |
var rad_Earth = 6378.16; | |
var one_degree = (2 * Math.PI * rad_Earth) / 360; | |
var one_km = 1 / one_degree; | |
function randomInRange(from, to, fixed) { |
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
.ring { | |
width: 300px; | |
height: 300px; | |
border-radius: 50%; | |
position: absolute; | |
background-color: transparent; | |
border: 15px gray solid; | |
-webkit-animation-name: ani; | |
-webkit-animation-iteration-count: infinite; | |
-webkit-animation-timing-function: ease; |
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
.outer-ring { | |
border: 3px solid #999; | |
-webkit-border-radius: 30px; | |
height: 22px; | |
width: 22px; | |
position: absolute; | |
left:20px; | |
top:214px; | |
-webkit-animation: pulsate 1s ease-out; | |
-webkit-animation-iteration-count: infinite; |
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
require 'rubygems' | |
require 'mechanize' | |
require 'test/unit' | |
require 'fakeweb' | |
def find_links | |
Mechanize.new.get('http://www.google.com').links | |
end | |
class TestGoogle < Test::Unit::TestCase |
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
# Use this setup block to configure all options available in SimpleForm. | |
SimpleForm.setup do |config| | |
# you need an updated simple_form gem for this to work, I'm referring to the git repo in my Gemfile | |
config.input_class = "form-control" | |
config.wrappers :bootstrap, tag: 'div', class: 'form-group', error_class: 'error' do |b| | |
b.use :html5 | |
b.use :placeholder | |
b.use :label | |
b.use :input |