Skip to content

Instantly share code, notes, and snippets.

View ddossot's full-sized avatar
:shipit:
s̴̝̺̫͖̞͛̑͆̀̽̕ḩ̵͌̀͘í̴̝̰͉̒́̐͗p̶̯͍͎͒̿́̈́̕

David Dossot ddossot

:shipit:
s̴̝̺̫͖̞͛̑͆̀̽̕ḩ̵͌̀͘í̴̝̰͉̒́̐͗p̶̯͍͎͒̿́̈́̕
View GitHub Profile
@ddossot
ddossot / gist:1202237
Created September 8, 2011 00:12
Mule pubsubhubbub:config
<pubsubhubbub:config objectStore-ref="hubObjectStore"
retryCount="5"
retryFrequency="3600000"
defaultLeaseSeconds="86400" />
@ddossot
ddossot / gist:1202227
Created September 8, 2011 00:06
Mule PubSubHubbub
<spring:beans>
<spring:bean id="hubObjectStore" class="org.mule.util.store.PartitionedInMemoryObjectStore" />
</spring:beans>
<pubsubhubbub:config objectStore-ref="hubObjectStore" />
<flow name="myHub">
<http:inbound-endpoint address="http://localhost:8080/hub" />
<pubsubhubbub:hub />
</flow>
@ddossot
ddossot / gist:1191772
Created September 3, 2011 20:53
log4erl appender for loggr
log4erl:warn("something is not right").
log4erl:info("user ~p just logged in~i", [{user, "u123"}, {geo, "40.1203,-76.2944"}]).
@ddossot
ddossot / gist:1191767
Created September 3, 2011 20:51
loggErL API calls
loggr_event:post(ApiKey, LogKey, "a new event").
loggr_event:post(ApiKey, LogKey, "an event with data", [{data, "some\ndata"}]).
@ddossot
ddossot / gist:1114855
Created July 29, 2011 22:13
Resque in RoR3
require 'resque/server'
YourApplication::Application.routes.draw do
mount Resque::Server => "/resque"
root :to => "home#index"
...
end
@ddossot
ddossot / gist:1036069
Created June 20, 2011 17:23
Riak Erlang Client & put if_not_modified
1> {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087).
{ok,<0.49.0>}
2> PO = riakc_obj:new(<<"b">>, <<"key">>, <<"value">>).
{riakc_obj,<<"b">>,<<"key">>,undefined,[],undefined,
<<"value">>}
3> {ok, Obj} = riakc_pb_socket:put(Pid, PO, [return_body]).
{ok,{riakc_obj,<<"b">>,<<"key">>,
<<107,206,97,96,96,96,204,96,202,5,82,44,44,87,239,150,
<pattern:http-proxy name="dynamic-http-proxy"
inboundAddress="http://localhost:8080/acme-data"
outboundAddress="http://acme.org/feeds/#[header:INBOUND:X-Acme-Feed]" />
<pattern:http-proxy name="abstract-parent-http-acme-proxy"
abstract="true"
transformer-refs="canonical-to-acme add-acme-headers"
responseTransformer-refs="drop-acme-headers acme-to-canonical" />
<pattern:http-proxy name="concrete-acme-http-proxy"
parent="abstract-parent-http-proxy"
inboundAddress="http://localhost:8080/acme-data"
outboundAddress="http://acme.org/feeds/data" />
<pattern:http-proxy name="transforming-http-proxy"
inboundAddress="http://localhost:8080/acme-data"
transformer-refs="canonical-to-acme add-acme-headers"
responseTransformer-refs="drop-acme-headers acme-to-canonical"
outboundAddress="http://acme.org/feeds/data" />
<pattern:http-proxy name="http-proxy-sample"
inboundAddress="http://localhost:8080/acme-data"
outboundAddress="http://acme.org/feeds/data" />
<pattern:http-proxy name="http-proxy-sample">
<http:inbound-endpoint address="http://localhost:8080/acme-data" />
<http:outbound-endpoint address="http://acme.org/feeds/data" />
</pattern:http-proxy>