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
defmodule Ddd.Macros do | |
defmacro __using__ do | |
@rules [] | |
end | |
defmacro defrule(signature, body) do | |
quote do | |
# Prepend the signature to the list of rules.... | |
@rules [ signature | @rules] | |
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
[databases] | |
ckan_default = host=192.168.1.1 port=5432 dbname=ckan_default user=ckan password=PASSWORD | |
[pgbouncer] | |
logfile = /var/log/postgresql/pgbouncer.log | |
pidfile = /var/run/postgresql/pgbouncer.pid | |
listen_addr = 127.0.0.1 | |
listen_port = 6432 | |
unix_socket_dir = /var/run/postgresql | |
auth_type = any |
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 python | |
# mkvirtualenv transfer | |
# pip install ckanapi | |
SOURCE = "http://br.ckan.net" | |
TARGET_ORGANISATION = "open-knowledge-brasil" | |
SOURCE_TAG = "meta.imported-from-br-ckan-net" | |
import ckanapi |
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
Interactive Elixir (1.0.2) - press Ctrl+C to exit (type h() ENTER for help) | |
v(1): [1,2,3] | |
[1, 2, 3] | |
v(2): [45, 46, 47] | |
'-./' |
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
pipeline :browser do | |
plug :accepts, ~w(html) | |
plug :fetch_session | |
plug :fetch_flash | |
plug :protect_from_forgery | |
end | |
pipeline :api do | |
plug :accepts, ~w(json) |
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
SELECT nspname || '.' || relname AS "relation", | |
pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size" | |
FROM pg_class C | |
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
AND C.relkind <> 'i' | |
AND nspname !~ '^pg_toast' | |
ORDER BY pg_total_relation_size(C.oid) DESC | |
LIMIT 20; |
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
v(1): <<"@" :: utf8, v :: binary>> = "@admin_email" | |
"@admin_email" | |
v(2): <<"@" :: utf8, v :: utf8>> = "@admin_email" | |
** (MatchError) no match of right hand side value: "@admin_email" |
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
---- Minecraft Crash Report ---- | |
// Why is it breaking | |
Time: 2/8/15 4:12 PM | |
Description: Initializing game | |
java.lang.ExceptionInInitializerError | |
at mod_PizzaMod.<init>(mod_PizzaMod.java:120) | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) |
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
[error] Error in process <0.402.0> with exit value: {#{'__exception__'=>true,'__struct__'=>'Elixir.Protocol.UndefinedError',description=>nil,protocol=>'Elixir.String.Chars',value=>{invalid,<<1 byte>>}},[{'Elixir.String.Chars','impl_for!',1,[{file,"lib/string/chars.ex"},{line,3}]},{'Elixir.String.Chars'... |
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
** (exit) an exception was raised: | |
** (FunctionClauseError) no function clause matching in Phoenix.Transports.WebSocket.ws_info/2 | |
(phoenix) lib/phoenix/transports/websocket.ex:67: Phoenix.Transports.WebSocket.ws_info(%{"behaviour" => "behaviours/global/my.behaviour", "post" => %{"demographics" => [%{"hospital_number" => "54321", "nhs_number" => "1234"}], "diagnosis" => %{"condition" => "CAP"}}, "pre" => %{"demographics" => [%{"hospital_number" => "54321", "nhs_number" => "1234"}], "diagnosis" => %{"condition" => "CAP"}}, "success" => true}, %{router: Cedar.Router, serializer: Phoenix.Transports.JSONSerializer, sockets: #HashDict<[{"audit:all", %Phoenix.Socket{assigns: %{}, authorized: true, channel: Cedar.AuditChannel, pid: #PID<0.419.0>, router: Cedar.Router, topic: "audit:all", transport: Phoenix.Transports.WebSocket}}]>}) | |
(phoenix) lib/phoenix/endpoint/cowboy_websocket.ex:62: Phoenix.Endpoint.CowboyWebSocket.websocket_info/3 | |
(cowboy) src/cowboy_websocket.erl:588: :cowboy_websock |