conversation of the cutting-edge techs
link to subscribe feed
| { | |
| "clusters": { | |
| "destinations": { | |
| "version": "0.90.10", | |
| "config": { | |
| "cluster": { | |
| "name": "destinations_development" | |
| }, | |
| "path": { | |
| "data": "tmp/elasticsearch", |
conversation of the cutting-edge techs
link to subscribe feed
Generate a new Elixir project using mix and add cowboy and plug as dependencies in mix.exs:
defp deps do
[
{:cowboy, "~> 1.0.0"},
{:plug, "~> 0.8.1"}
]
end| defmodule Koncur.AuthenticationPlug do | |
| alias Plug.Conn | |
| alias Phoenix.Status | |
| alias Phoenix.Controller.Errors | |
| alias Poison, as: JSON | |
| import Phoenix.Controller.Connection | |
| import Plug.Conn | |
| import Ecto.Query, only: [from: 2] | |
| def init(opts), do: opts |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'bundler' | |
| require 'fileutils' | |
| require 'net/http' | |
| require 'net/https' | |
| require 'uri' | |
| TMP_DIR = "/tmp/gems" |
| #!/usr/bin/env jruby | |
| require 'rubygems' | |
| require 'spoon' | |
| APPNAME = 'fileserver' | |
| WORK_PATH = Dir.pwd | |
| EXEC = "#{ENV['HOME']}/.rbenv/shims/puma" | |
| PID_PATH = "#{WORK_PATH}/log/#{APPNAME}.pid" | |
| OUT_PATH = "#{WORK_PATH}/log/#{APPNAME}.out.log" |
| require "thread" | |
| class BoundedQueue | |
| def initialize(max_size = :infinite) | |
| @lock = Mutex.new | |
| @items = [] | |
| @item_available = ConditionVariable.new | |
| @max_size = max_size | |
| @space_available = ConditionVariable.new | |
| end |
| #!/usr/bin/env jruby | |
| # | |
| # | |
| require 'rubygems' | |
| require 'spoon' | |
| EXEC = '/tmp/exec.rb' | |
| PID_PATH = '/tmp/exec.pid' | |
| WORK_PATH = '/tmp/' |
| require 'rubygems' | |
| require 'spoon' | |
| Spoon.spawnp 'jruby', *ARGV |
| #!/usr/bin/env jruby | |
| # | |
| # | |
| require 'rubygems' | |
| require 'spoon' | |
| EXEC = '/tmp/exec.rb' | |
| PID_PATH = '/tmp/exec.pid' | |
| WORK_PATH = '/tmp/' |