I hereby claim:
- I am ulfurinn on github.
- I am ulfurinn (https://keybase.io/ulfurinn) on keybase.
- I have a public key ASAnUU569hnVj7NyM68L19fWt4pJlJzpPnUoOqyHnisfzwo
To claim this, I am signing this object:
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: thin | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: thin initscript | |
# Description: thin | |
### END INIT INFO |
require "amqp" | |
require "fiber" | |
module AMQP_RPC | |
module Client | |
def subscribe | |
response_queue.subscribe do |header, body| | |
id = header.correlation_id |
#!/usr/bin/env ruby | |
require "dante" | |
require "amqp" | |
require "oj" | |
$0 = "My project generator" | |
Dir.chdir "/var/www/my-project" | |
Dante.run "my-project", pid_path: '/var/www/my-project-generator.pid', user: 'www-data', group: 'www-data' do |
// A quick and dirty demo of talking HTTP over Unix domain sockets | |
package main | |
import ( | |
"fmt" | |
"io" | |
"net" | |
"net/http" | |
"os" |
I hereby claim:
To claim this, I am signing this object:
This is a quick stab at a problem that the set_locale
package is supposed to solve but seems to be broken and unsupported, or at least that's what its issue list indicates.
We want to extract the locale from the path prefix; i.e. "/en/users"
and "/sv/users"
should correctly set the current Gettext locale for the request. "/users"
should keep the default locale.
We're not considering cookies or Accept-Language
in this scope. We also don't do redirecting; the unlocalized path will hit the action as usual.
Using this solution requires two changes to the router:
localized/2
macro. It simply repeats its content with and without a scope /:locale
so that both versions are visible to the route inspector and play nicely with verified routes.A simple PubSub adapter that sends messages between nodes over AMQP.
The app supervisor needs to be configured with:
{Phoenix.PubSub, name: App.PubSub, adapter: Phoenix.PubSub.AMQP, amqp: [connection: amqp_connection_id]},
An Elixir implementation of the output iterator/IntoIterator
idiom over Collectable and Arrays.