- Timeouts, retries, and backoff with jitter
- Resiliency in Distributed Systems
- Fault Tolerance in a High Volume, Distributed System
- All you need to know about timeouts
- Your Circuit Breaker is Misconfigured
- Fixing retries with token buckets and circuit breakers
- Making retries safe with idempotent APIs
- What is Backoff For?
- [Handling Overload](https://sre.google/sre-book/handling-overloa
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
module Devise | |
module Models | |
module RemoteAuthenticatable | |
extend ActiveSupport::Concern | |
# | |
# Here you do the request to the external webservice | |
# | |
# If the authentication is successful you should return | |
# a resource instance |
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
module Devise | |
module Strategies | |
class RemoteAuthenticatable < Authenticatable | |
# | |
# For an example check : https://github.com/plataformatec/devise/blob/master/lib/devise/strategies/database_authenticatable.rb | |
# | |
# Method called by warden to authenticate a resource. | |
# | |
def authenticate! | |
# |
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
require ['fileA', 'fileB'], (A, B) -> | |
describe "An example", -> | |
it "depends on A and B" |
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
<div class="container"> | |
<div class="row"> | |
<div class="col-sm-6 col-md-4 col-md-offset-4"> | |
<h1 class="text-center login-title">Sign in to continue to Bootsnipp</h1> | |
<div class="account-wall"> | |
<img class="profile-img" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=120" | |
alt=""> | |
<form class="form-signin"> | |
<input type="text" class="form-control" placeholder="Email" required autofocus> | |
<input type="password" class="form-control" placeholder="Password" required> |
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
#!/usr/bin/env ruby | |
version = ARGV[0] || raise('pass version as first argument') | |
def execute(cmd) | |
raise unless system cmd | |
end | |
execute "npm version #{version} -m 'Bump to version: v#{version}'" | |
execute "git push" | |
execute "git push --tags" |
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
// Welcome! require() some modules from npm (like you were using browserify) | |
// and then hit Run Code to run your code on the right side. | |
// Modules get downloaded from browserify-cdn and bundled in your browser. | |
var contentful = require('contentful-management'); | |
var client = contentful.createClient({ | |
accessToken: '' | |
}) | |
var space = client.getSpace('') | |
.then((space) => { |