This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
background-color: #ffffff; | |
margin: 0; | |
overflow: hidden; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define BTN_DEBOUCE 20 //ms | |
ISR(INT0_vect) { | |
uint16_t timer = 0; | |
while(bit_is_clear(PIND, PD2)) { // button hold down | |
timer++; // count how long button is pressed | |
_delay_ms(1); | |
} | |
if(timer > BTN_DEBOUCE) { // software debouncing button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////////////////////////////////////////////////////// | |
// Polygon Creation Exercise | |
// Your task is to complete the function PolygonGeometry(sides) | |
// which takes 1 argument: | |
// sides - how many edges the polygon has. | |
// Return the mesh that defines the minimum number of triangles necessary | |
// to draw the polygon. | |
// Radius of the polygon is 1. Center of the polygon is at 0, 0. | |
//////////////////////////////////////////////////////////////////////////////// | |
/*global, THREE, Coordinates, $, document, window*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygst | |
pygst.require("0.10") | |
import gst | |
import soundcloud | |
import sys | |
query = sys.argv[1] ##TODO try catch for no parameters | |
client = soundcloud.Client(client_id='xxx') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($,window, document, undefined){ | |
var defaults = { | |
resizing: true | |
}; | |
var BreakpointManager = function(element, options) { | |
this.el = element; | |
this.$el = $(element); | |
this.options = $.extend({}, defaults,options); | |
this.breakpoints = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var observer = {}; | |
_.extend(observer,Backbone.Events); | |
//use | |
observer.trigger("keyboard:pressed",obj); | |
observer.on("keyboard:pressed", function(obj) {}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
'use strict'; | |
// Project configuration. | |
grunt.initConfig({ | |
jasmine : { | |
src : 'src/**/*.js', | |
options : { | |
specs : 'spec/**/*.js' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
background-color: #fff; | |
margin: 0; | |
overflow: hidden; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($,window, document, undefined){ | |
var defaults = { | |
resizing: true | |
} | |
var BreakpointManager = function(element, options) { | |
this.el = element; | |
this.$el = $(element); | |
this.options = $.extend({}, defaults,options); | |
this.breakpoints = {}; |
NewerOlder