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 / ClockingIT-Ubuntu-10.04.md
Created January 9, 2017 20:52
How to install ClockingIT on Ubuntu 10.04
// hacked from the code at https://github.com/qiciengine/qiciengine-server
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
Morabaraba / qici-projects.md
Last active March 10, 2017 09:30
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.

@Morabaraba
Morabaraba / git-tricks.md
Created February 25, 2017 18:35
GIT tricks

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 "$@"'

http://stackoverflow.com/a/4494037

@Morabaraba
Morabaraba / cloud9.issues.21.md
Created May 10, 2017 13:12
cloud9 v2 gpl ctrl+v cmd+v copy paste issue: https://github.com/exsilium/cloud9/issues/21

For pylonide/pylon#21

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 https://github.com/exsilium/term.js.git instead.

It to crude?

ubuntu@ubuntu-xenial:~/bin/cloud9/node_modules/term.js$ npm update
@Morabaraba
Morabaraba / c9.v2.ace.build.issue.md
Created May 10, 2017 19:18
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
@Morabaraba
Morabaraba / hello.py
Created September 25, 2018 15:19
modified `hello.py` [connexion](https://github.com/zalando/connexion/) example to include `Accept` header validation decorator.
#!/usr/bin/env python3
import connexion
import flask
from decorator import decorator
@decorator
def requires_header(f: callable, *args, **kwargs):
accept = flask.request.headers.get('Accept')
print(accept)
if not accept or accept != 'application/xml':