Skip to content

Instantly share code, notes, and snippets.

@robertcasanova
robertcasanova / Makefile
Created June 15, 2014 15:26
Makefile AVR
##########------------------------------------------------------##########
########## Project-specific Details ##########
########## Check these every time you start a new project ##########
##########------------------------------------------------------##########
MCU = atmega328p
F_CPU = 1000000
BAUD = 9600
## Also try BAUD = 19200 or 38400 if you're feeling lucky.
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "save only",
"linters": {
"csslint": {
@robertcasanova
robertcasanova / laserPrinted.dru
Created June 29, 2014 10:57
Eagle Design Rules for laser printed circuits
description[it] = <b>EAGLE Design Rules</b>\n<p>\nThe default Design Rules have been set to cover\na wide range of applications. Your particular design\nmay have different requirements, so please make the\nnecessary adjustments and save your customized\ndesign rules under a new name.
layerSetup = (1*16)
mtCopper = 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm
mtIsolate = 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm
mdWireWire = 0.8mm
mdWirePad = 0.8mm
mdWireVia = 0.8mm
mdPadPad = 0.45mm
mdPadVia = 0.8mm
mdViaVia = 0.8mm
var paper = Raphael(0, 0, 400, 400);
var r = 100;
var steps = 120;
var totLed = 48;
// Sets the fill attribute of the circle to red (#f00)
var circles = [];
// Sets the stroke attribute of the circle to white
var alpha = 0;
@robertcasanova
robertcasanova / list.html
Created February 25, 2012 19:57
Micro Tmpl + RequireJS
<% for ( var i = 0; i < dataObject.length; i++ ) { %>
<article id="<%=dataObject[i].id%>" class="<%=(i % 2 == 1 ? "even" : "")%>">
<figure class="clearfix">
<img src="img/<%=i%>_<%=dataObject[i].profile_image_url%>" alt="<%=dataObject[i].id%>" title="<%=dataObject[i].id%>" />
<figcaption>
<strong><%=dataObject[i].id%></strong>
<span class="text"><%=dataObject[i].text%></span>
<span class="contact">Per contatti: <a href="mailto:<%=dataObject[i].from_user%>"><%=dataObject[i].from_user%></a></span>
</figcaption>
</figure>
@robertcasanova
robertcasanova / gist:1925212
Created February 27, 2012 16:35
Store Locator
var StoreLocator = {
stores: {},
resize: function(size) {
if(store_located)
$('.storeFinder',this.$layout).css('width',(size[0] - $('.closestStore').width() - 40 - 10));
$('.map',this.$layout).css('height',(size[1] - 407 - 5)); // 437 = $('#footer_main').height()
this.getCarouselLimit();
},
@robertcasanova
robertcasanova / gist:1941314
Created February 29, 2012 14:50
Notifications HTML5
if (window.webkitNotifications) {
if (window.webkitNotifications.checkPermission() == 0) {
var note = window.webkitNotifications.createNotification("", "Hi", "I'm a notification");
note.ondisplay = function(event) {
setTimeout(function() {
event.currentTarget.cancel();
}, 2000);
}
note.show();
}
@robertcasanova
robertcasanova / carousel.css
Created March 6, 2012 15:31
Cross device Carousel.
@robertcasanova
robertcasanova / ga_social_tracking.js
Created April 24, 2012 10:27
Tracking Socials on Analytics (from Google)
// Copyright 2012 Google Inc. All Rights Reserved.
/**
* @fileoverview A simple script to automatically track Facebook and Twitter
* buttons using Google Analytics social tracking feature.
* @author api.nickm@gmail.com (Nick Mihailovski)
* @author api.petef@gmail.com (Pete Frisella)
*/