Skip to content

Instantly share code, notes, and snippets.

quote do
result = case content_type do
unquote(clauses)
end
end
resulting in error:
Compiled lib/vaquero.ex
Generated vaquero.app
=ERROR REPORT==== 16-Jul-2013::16:46:59 ===
Error in process <0.319.0> with exit value: {{case_clause,{<<27 bytes>>,{http_req,#Port<0.6068>,ranch_tcp,keepalive,<0.319.0>,<<3 bytes>>,'HTTP/1.1',{{127,0,0,1},63634},<<9 bytes>>,[],8484,<<26 bytes>>,[],<<0 bytes>>,undefined,[{resource,<<17 bytes>>}],[{<<14 bytes>>,<<1 byte>>},{<<4 bytes>>,<<14 bytes>>},{<<10 bytes>>,<<13 bytes>>},{<<12 bytes>>,<<16 bytes>>}],[{<<12 bytes>>,{<<11 bytes>>,<<4 bytes>>,[]}},{<<17 bytes>>,undefined},{<<13 bytes>>,undefined},{<<19 bytes>>,undefined},{<<8 bytes>>,undefined},{<<6 bytes>>,undefined}],undefined,[{charset,undefined...
.....[{{ranch_listener_sup,'Elixir.CowboyTest.Handler1'},
{ranch_listener_sup,start_link,
['Elixir.CowboyTest.Handler1',100,ranch_tcp,
[{port,8484}],
cowboy_protocol,
[{env,
[{middlewares,
['Elixir.CowboyTest.Handler1.Router',cowboy_handler]}]}]]},
permanent,5000,supervisor,
[ranch_listener_sup]}]
Hardware Overview:
Model Name: MacBook Air
Model Identifier: MacBookAir4,2
Processor Name: Intel Core i5
Processor Speed: 1.7 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 3 MB
defp dispatch([unquote_splicing(arg_list) | acceptor], req) do
bindings = [unquote_splicing(var_bindings)]
req = :cowboy_req.set_bindings([], acceptor, bindings, req)
{:ok, {unquote(name), req}}
end
defmodule Test do
defmacro defstart(call, options) do
:io.format("~p:~p~n", [call, options])
nil
end
end
---------------------------------------
@ericbmerritt
ericbmerritt / Makefile
Last active August 11, 2023 09:35
Universal drop in Makefile for Erlang projects that use rebar
# Copyright 2012 Erlware, LLC. All Rights Reserved.
#
# This file is provided to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
vagrant test [51d9b0b]
/usr/lib/ruby/1.8/fileutils.rb:1268:in `initialize': Permission denied - /var/lib/gems/1.8/gems/vagrant-1.0.6/keys/vagrant (Errno::EACCES)
from /usr/lib/ruby/1.8/fileutils.rb:1268:in `open'
from /usr/lib/ruby/1.8/fileutils.rb:1268:in `copy_file'
from /usr/lib/ruby/1.8/fileutils.rb:464:in `copy_file'
from /usr/lib/ruby/1.8/fileutils.rb:383:in `cp'
from /usr/lib/ruby/1.8/fileutils.rb:1402:in `fu_each_src_dest'
from /usr/lib/ruby/1.8/fileutils.rb:1418:in `fu_each_src_dest0'
from /usr/lib/ruby/1.8/fileutils.rb:1400:in `fu_each_src_dest'
from /usr/lib/ruby/1.8/fileutils.rb:382:in `cp'
@ericbmerritt
ericbmerritt / gist:5306234
Last active December 15, 2015 18:49
potential talk abstract

Current state of the art in distributed systems revolves around service oriented architectures that can be scaled based on demand. This requires being able to add services on the fly as demand increases and recognizing capacity decrease when services fail. Myrmas is a solution to this problem. Myrmas is a robust general Service Availability and Health Registry designed to be used as a basis for large scale distributed systems. It is designed to scale simply from two nodes to hundreds of thousands of nodes while making as few assumptions around network topology and connectivity as possible. Myrmas is built around a robust membership protocol called DIMPLE-II paired with an epidemic data propagation protocol called Newscast. Together, these allow Myrmas to provide the solid foundation on which to build large scale heterogenious distributed systems.

One of the key features of Myrmas is that is designed from the ground up to support mixed language systems. It does this through two main avenues.

  1. The simple
clean: $(REBAR)
$(REBAR) skip_deps=true clean
- rm -rf $(CURDIR)/doc/*.html
- rm -rf $(CURDIR)/doc/*.css
- rm -rf $(CURDIR)/doc/*.png
clean-deps: clean
rm -rvf $(CURDIR)/deps/*
rm -rf $(ERLWARE_COMMONS_PLT).$(ERL_VER)