There is a trending 'microservice' library called go-kit. I've been using the go-kit library for a while now. The library provide a lot of convenience integrations that you might need in your service: with service discovery with Consul, distributed tracing with Zipkin, for example, and nice logic utilities such as round robin client side load balancing, and circuit breaking. It is also providing a way to implement communication layer, with support of RPC and REST.
To add a simulator | |
Choose Hardware > Device > Manage Devices. | |
Xcode opens the Devices window. | |
At the bottom of the left column, click the Add button (+). | |
In the dialog that appears, enter a name in the Simulator Name text field and choose the device from the Device Type pop-up menu. | |
//by default |
package main | |
import ( | |
"net/http" | |
"strconv" | |
"github.com/labstack/echo" | |
mw "github.com/labstack/echo/middleware" | |
"github.com/rs/cors" | |
"github.com/thoas/stats" |
by alexander white ©
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# Usage: | |
# 1. Drop this file into lib/capistrano/submodule_strategy.rb | |
# 2. Add the following to your Capfile: | |
# require 'capistrano/git' | |
# require './lib/capistrano/submodule_strategy' | |
# 3. Add the following to your config/deploy.rb | |
# set :git_strategy, SubmoduleStrategy | |
module SubmoduleStrategy | |
# do all the things a normal capistrano git session would do |
# coding=UTF-8 | |
import nltk | |
from nltk.corpus import brown | |
# This is a fast and simple noun phrase extractor (based on NLTK) | |
# Feel free to use it, just keep a link back to this post | |
# http://thetokenizer.com/2013/05/09/efficient-way-to-extract-the-main-topics-of-a-sentence/ | |
# Create by Shlomi Babluki | |
# May, 2013 |
I wrote a middleware (actually two, but they do the same with different implementations) that logs information about signed in scopes in a Rails + Devise application. The solution works with multiple logins (like having a person logged both as an Admin
and a User
). I tested against Rails 4 and Devise HEAD
, but it should work fine in any Rails 3 application.
This solution doesn't use the log_tags
configuration option since it isn't very helpful when you need to retrieve information stored in cookies/session. That information isn't 'ready' when the Rails::Rack::Logger
is executed, since it happens way down in the middleware chain.
Add one of the following implementations to your application load path and use the following configuration to add the middleware to your application stack:
# application.rb