Skip to content

Instantly share code, notes, and snippets.

Luca Faggianelli lucafaggianelli

View GitHub Profile
View Calendar.vue
<v-flex xs12>
<v-toolbar flat>
<!-- Today Button -->
<v-tooltip bottom>
<v-btn slot="activator"
lucafaggianelli / rgb-led-fw.c
Last active Apr 10, 2016
PIC18 firmware for RGB LED driver
View rgb-led-fw.c
#define ST_CHAR 0xFE
#define ESC_CHAR 0xFD
#define MSG_LEN 6
unsigned char rxCounter = 0, escaped = 0, in_msg = 0, rxBuffer[MSG_LEN];
void parseSerialMsg(void) {
static unsigned char byte, status;
if (DataRdyUSART()) {
View freebase.rb
module Freebase
require 'rest-client'
NS = ''
API_URL = ''
API_KEY = 'your_key_here'
RestClient.proxy = ENV['http_proxy']
MQLClient =
View freebase.js
var Freebase = {
api: '',
key: '?key=' + 'your_key_here',
// Main image (icon) of a topic
img: function(mid) {
return this.api + '/image' + mid + this.key;
// MQL query with callback on success
View build_done_template.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Actionable emails e.g. reset password</title>
<style type="text/css">
img {
#!/usr/bin/env python
import sys
import requests
import logging
from jinja2 import Template
template = None
html = None
URL = ""
KEY = "key-ed60f4288cb8b9c15d876ad2ae06c545"
lucafaggianelli /
Created Jan 7, 2015
Font Awesome LESS to Android XML
import sys
import urllib2
import re
# LESS source file
re_less_var = re.compile('.*:\s*"(.*)";')
re_fa_var = re.compile('^@fa-var-(.*):\s*"\\\\(.*)";')
import SimpleHTTPServer
import SocketServer
from urlparse import urlparse, parse_qs
import cgi
import logging
from datetime import datetime
PORT = 8000
lucafaggianelli /
Created Aug 27, 2014
Download many files in parallel
import os
import time
import urllib2
from multiprocessing import Pool
BASE = '{0:0>3}?$pngsmall$'
def millis():
return int(round(time.time() * 1000))
You can’t perform that action at this time.