Skip to content

Instantly share code, notes, and snippets.

View msabwat's full-sized avatar

b1ue msabwat

View GitHub Profile
@msabwat
msabwat / rostring.c
Created January 10, 2018 13:19
Fonction de l'examen
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* rostring.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: msabwat <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/01/09 10:04:25 by exam #+# #+# */
/* Updated: 2018/01/09 13:49:33 by exam ### ########.fr */
/* */
@msabwat
msabwat / Magic_pointer.md
Last active June 6, 2018 21:13
Welcome file

Magic pointer

This is a draft for a solution that enables a mobile device to control a mouse pointer. For convenience we will set the server as the phone, and the client as the device with the mouse.

Getting the device orientation

We have a webpage that we will use in the device to get the rotation around two axes. We use an EventListener for deviceorientation.

@msabwat
msabwat / Pubkey
Created September 12, 2018 19:00
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDN515TAsPsTGZNtPoWaIje+7u/qQWEBXTqqIKrOpWVLa4J6aOp5m9hPBLtBOz8kv24FSqQHRy3KAGkE+FHs8wtlSma7KKVemkJgQUekpkJRlqHg7qLkb8LQaGvI1LlkIoVCZm3P2Q+zV2MyyR+YLEOVbzAml2VXScUN7neniL/SLdfhpp2MMw1ZMyltc3mt5nXZIa7FUEI76q071SIh8iq3Y/0Dyf3fLMeCfUmpm2KR9yEm0Y9PrzSdTsLQD4Cg8csfx0rJI7bQ+iMoZvsXuENu3vHRBIgXTkUcsEWkchZsYVUeawSvqFf6lEMD0i2P0U1pvuIUyAfbw1SFJ0aRdVRX0rbfTm3AFtYOqzndeAnGklPRG8ApgE0kGNj1ZfTme8dBnTJKZMVRy8KoPBkq2AQM2BS3N6iUSaB0A9PAnh5wyC0Ii5N6CLU70AMiUvgc3dW39pRWR1fpJodMRNjJcolpOiRul0omNxQxlmekPx7WpO4LNpxNDh50iLyZBmCZK91SOQaQA7iDhsFN1DHBTPonZl7UD3VIvLfnkDbIdjkE87dM+nrrgiQtY4EzAzBJGoB07T48Je+Tb0Q1Cqs64yN+b03fQ529D2eYtc5nUSpxSWbxT2YIhdlScEIo1ZIOWEdONXl7am8jjppIc0YlboYT2kLbLddb/9URG1zuDI/bQ== [email protected]
import hashlib
s = ""
start = 0
end = 0xFFFFFF
i = 0
import string
import random
def id_generator(size=random.randint(10,30), chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
@msabwat
msabwat / overview.md
Last active March 17, 2019 21:20
Dragon library overview

Overview

Dragon is a library that contains helper functions to create device firmware and monitor it with an Android App.

diagram

Components

  • Dragon binary:
// command : em++ --bind main.cpp -o test.html -g
#include <emscripten.h>
#include <emscripten/emscripten.h>
#include <emscripten/val.h>
#include <emscripten/bind.h>
#include <strings.h>
using namespace emscripten;
void awn_cb (int channels) {
@msabwat
msabwat / keybase.io
Created February 17, 2023 20:37
kybs
### Keybase proof
I hereby claim:
* I am msabwat on github.
* I am mehdee (https://keybase.io/mehdee) on keybase.
* I have a public key ASBCZHCI529Ookbp8IVNwFla4bnIhwEpr5JrTF-pm01Rewo
To claim this, I am signing this object: