Skip to content

Instantly share code, notes, and snippets.

View wizardjedi's full-sized avatar

Sayapin Alexander wizardjedi

View GitHub Profile
@wizardjedi
wizardjedi / send.sh
Created January 25, 2018 15:06 — forked from matwey/send.sh
Send binary payloaded message to AMQP unsing rabbitmq rest-api.
#!/bin/sh
BODY='\00\00\00\01\00\00\00\00'
BODY64=$(echo -ne $BODY | base64)
S='{"properties":{},"routing_key":"test","payload":"'$BODY64'","payload_encoding":"base64"}'
echo $S | curl --data-binary @- -i -u guest:guest http://192.168.185.182:15672/api/exchanges/%2f/amq.default/publ ish -X POST
@wizardjedi
wizardjedi / gist:64053ad1193cfbc5c4c3d1cb0428dd4c
Created May 22, 2017 19:01 — forked from jestan/gist:4411538
MAP Protocol Error Codes

MAP Protocol Error Codes

Generic errors

34 System failure

35 Data Missing

36 Unexpected Data Value

21 Facility Not Supported

#!/usr/bin/env escript
% -*- mode: erlang -*-
main([BeamFile]) ->
{ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(BeamFile,[abstract_code]),
io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]).
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* 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
@wizardjedi
wizardjedi / kafka.md
Last active August 29, 2015 14:15 — forked from ashrithr/kafka.md

Introduction to Kafka

Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.

Terminology:

  • Producers send messages to brokers
  • Consumers read messages from brokers
  • Messages are sent to a topic
Package: tmp
Version: 0.1
Maintainer: Huy Morzhoviy <[email protected]>
Architecture: all
Depends:
Description: Source simple package