Skip to content

Instantly share code, notes, and snippets.


Fabrizio Guglielmino guglielmino

View GitHub Profile
View declarative-api-mapper
verb: GET
path: /api/user/:id
spec: '{
"id": "",
"username": "@data.user.username"

Keybase proof

I hereby claim:

  • I am guglielmino on github.
  • I am guglielmino ( on keybase.
  • I have a public key ASDle83NdPa1FeLENbqrgHmUrHeG7Wkx510a3aqCXDjGGwo

To claim this, I am signing this object:

View uart_mongoose_os.c
#include "common/mbuf.h"
#include "common/platform.h"
#include "mgos.h"
#include "mgos_uart.h"
#include "mgos_timers.h"
* GPIO pin numbers, default values depend on UART number.
View arduino_intr_sample.ino
void int_func()
Serial.write("Button pressed");
void setup() {
pinMode(0, INPUT_PULLUP);
attachInterrupt(0, int_func, FALLING);
View mos_interrupt_sample.c
#include "mgos.h"
void int_func(int pin, void *arg) {
(void) arg;
LOG(LL_DEBUG, ("Pin pressed %d", pin));
enum mgos_app_init_result mgos_app_init(void) {
mgos_gpio_set_mode(0, MGOS_GPIO_MODE_INPUT);
View quiz.cs
public class NewClass {
private string _property { get; set; }
public NewClass(string s){
this._property = s;
public static implicit operator NewClass(string s){
return new NewClass(s);
View sonicpi
in_thread do
use_synth :fm
sleep 2
loop do
28.times do
sample :drum_bass_hard, amp: 0.8
sleep 0.25
play :e2, release: 0.2
sample :elec_cymbal, rate: 12, amp: 0.6
sleep 0.25
guglielmino / PostOnFb
Created Jun 26, 2015
Post on Facebook
View PostOnFb
postOnWall: function(message, name, description, link, picture, caption, onlyOne, cookieName) {
//vedo se ho il cookie settato
var alreadyPosted = "";
alreadyPosted = leggiCookie(cookieName); // jshint ignore:line
if (alreadyPosted !== "true") {
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
var userId = response.authResponse.userID;
var access_token = response.authResponse.accessToken;
//vedo se ho il permesso di pubblicazione
View SimpleFaceRecognition
import cv2
def DetectFace(img, face_cascade, callback):
image = None
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = face_cascade.detectMultiScale(gray, 1.3, 5)
for (x, y, w, h) in faces:
View gist:b4fa6e5d1c81f93acea8
# -*- coding: utf-8 -*-
from smbus import SMBus
from pushetta import Pushetta
import math
import time