Skip to content

Instantly share code, notes, and snippets.

Snake! Snake! Oooh it is a snake!

Morabaraba Morabaraba

Snake! Snake! Oooh it is a snake!
  • Digital Nomad
View GitHub Profile
Morabaraba /
Created Sep 25, 2018
modified `` [connexion]( example to include `Accept` header validation decorator.
#!/usr/bin/env python3
import connexion
import flask
from decorator import decorator
def requires_header(f: callable, *args, **kwargs):
accept = flask.request.headers.get('Accept')
if not accept or accept != 'application/xml':
Morabaraba /
Created May 10, 2017
GET http://localhost:3131/static/ace/build/ace.js 404 (Not Found) Cloud9 v2

Did a npm install and npm update and got the following WARN.

npm WARN cannot run in wd cloud9@2.1.5 cd node_modules/ace; make clean pre_build; ./Makefile.dryice.js minimal; cd ../.. (wd=/opt/cloud9)

When I started the server cloud9 reported:

GET http://localhost:3131/static/ace/build/ace.js  404 (Not Found) Cloud9 v2


Tested on Win 10, thanks. Will test on a mac soon.

First tried a npm update on the project to get your ctrl+v change. Realised I need to git clone instead.

It to crude?

ubuntu@ubuntu-xenial:~/bin/cloud9/node_modules/term.js$ npm update

change name and surname in all previous commits?

git filter-branch --commit-filter 'if [ "$GIT_AUTHOR_NAME" = "Your Name" ];
  then export GIT_AUTHOR_NAME="Morabaraba May"; export GIT_AUTHOR_EMAIL=TOPS3CR3T;
  fi; git commit-tree "$@"'

Morabaraba /
Last active Mar 10, 2017
List of QICI Projects with source

Firstly I want to thank the QICI team for their extensive list of demos. If you want to know how to do something you will most probably find a example there.

This list is more of projects I found scattered on github, self promotion, etc. If you want something added please let me know!

note atm most projects is just prototypes, toys or just someone checking the env and sharing their knowledge.

View simple-qici-log-server.js
// hacked from the code at
var port = 8900;
var bodyParser = require('body-parser')
var express = require('express');
var app = express();
var http = require('http').Server(app);
// 监听端口重复事件以进行重试
http.on('error', function(e) {
console.error('端口监听失败:%s', e.code);
Morabaraba /
Created Jan 9, 2017
How to install ClockingIT on Ubuntu 10.04
Morabaraba /
Created Nov 30, 2016
Oracle PDO OCI PHP Driver on CentOS 6

Oracle PDO OCI PHP Driver on CentOS 6

rpm -ivh oracle-instantclient11.2-basic-
rpm -ivh oracle-instantclient11.2-devel-
cp /usr/lib64/php/modules/
cp oracle.conf /etc/
/etc/init.d/httpd reload
Morabaraba /
Created Aug 27, 2016
Basic and epgsql

PostgreSQL + Erlang

Create a Makefile, see the getting started guide.

PROJECT = example1
DEPS = epgsql
Morabaraba /
Last active Aug 7, 2016
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("oct body:")
        for c in body: print(c)
        berty = bert.decode(body)
You can’t perform that action at this time.