Skip to content

Instantly share code, notes, and snippets.

@dbellettini
dbellettini / queries.py
Created December 6, 2013 16:43
SPARQL Subscription Queries
createQuery="""
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl:<http://www.w3.org/2002/07/owl#>
PREFIX xsd:<http://www.w3.org/2001/XMLSchema#>
PREFIX locateme:<http://www.semanticweb.org/CalcolatoriM/LocateMeOntology.owl#>
SELECT ?label ?user
WHERE {
locateme:MainCommandInterface locateme:HasCommand ?command .
?command locateme:HasCommandType locateme:Create .
@dbellettini
dbellettini / first-vagrant-up-error.txt
Last active December 24, 2015 07:40
Vagrant error
dpkg-preconfigure: unable to re-open stdin: No such file or directory
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.10/lib/librarian/puppet/lockfile/parser.rb:41:in `parse': Expected DEPENDENCIES topic! (StandardError)
from /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.10/vendor/librarian/lib/librarian/lockfile.rb:21:in `load'
from /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.10/vendor/librarian/lib/librarian/action/resolve.rb:31:in `run'
from /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.10/vendor/librarian/lib/librarian/cli.rb:161:in `resolve!'
from /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.10/lib/librarian/puppet/cli.rb:63:in `install'
from /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:27:in `__send__'
from /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_comm
@dbellettini
dbellettini / Vector.java
Last active December 23, 2015 09:39
Vector class
package com.davidebellettini.trafficspread.physics;
import com.davidebellettini.trafficspread.data.AverageSpeed;
public class Vector {
private final double modulus;
private final double angle;
public Vector(double modulus, double angle) {
@dbellettini
dbellettini / Puppetfile
Last active December 15, 2015 22:19
File di esempio per la configurazione di vagrant
forge "http://forge.puppetlabs.com"
mod "apache",
:git => "git://github.com/puppetlabs/puppetlabs-apache.git", :ref => '0.6.0'
mod 'puppetlabs/mysql'
mod 'puppetlabs/apt'
@dbellettini
dbellettini / gist:5119830
Created March 8, 2013 21:04
Behat + Mink + Symfony 2.2.0 infinite loop
Feature: Add a school
In order to know which schools are available
As moderator
I need to list schools
Scenario: Standard list # src/Universibo/Bundle/DashboardBundle/Features/school_list.feature:6
Given I'm logged in as "moderator" # Universibo\Bundle\DashboardBundle\Features\Context\FeatureContext::iMLoggedInAs()
Fatal error: Maximum function nesting level of '100' reached, aborting! in /home/davide/git/UniversiBO/UniversiBO/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php on line 54
"replaces": {
"smarty/smarty": "v3.1.11"
},
@dbellettini
dbellettini / gist:4379732
Last active December 10, 2015 04:18 — forked from anonymous/gist:4379687
S-OFF failed
=============================================
| Revolutionary S-OFF & Recovery Tool 0.4pre4 |
=============================================
Brought to you by AlphaRev & unrEVOked.
Waiting for device...
Found your device: HTC Desire (bravo-1.02.0001, Android: 2.3.3, ROM version: 3.14.405.1)
This is a beta release and requires a beta release key.
Please visit: http://revolutionary.io for more information.
@dbellettini
dbellettini / gist:4017532
Created November 5, 2012 14:46
UniversiBO didactics class diagram
[Scuola|codScuola;nome]<>1-*>[Dipartimento|codDipartimento;nome]
[Scuola]-[note: nuova entità che sostituisce la facoltà ma strutturalmente diversa]
[Dipartimento]<>1-*>[CorsoDiLaurea|codCorso;nome]
[CorsoDiLaurea]<>1-*>[Insegnamento|annoCorso]
[Insegnamento]-[Materia|codMateria;nome]
[Insegnamento]-[BloccoLezioni|annoAccademico;ciclo]
[Materia]-[note: corrispondenza biunivoca tra codMateria e nome]
[BloccoLezioni]-[Docente|codDoc;nome;cognome]
@dbellettini
dbellettini / clone.txt
Created June 16, 2012 14:52
Cloning ServeAiuto plugins
git clone https://github.com/cakephp/debug_kit DebugKit
git clone git://github.com/rafaelbandeira3/linkable.git Linkable
git clone git://github.com/dereuromark/tools.git Tools
git clone https://github.com/voidet/sign_me_up.git SignMeUp
git clone git://github.com/stefanomanfredini/AddressFinder-Helper---Plugin-for-cakephp-2.git AddressFinder
git clone https://github.com/stefanomanfredini/cakephp-2.x-BookmarkletHelper Bookmarklet
cd Tools
git checkout 2.0
@dbellettini
dbellettini / package-list-universibo
Created March 1, 2012 12:55
Ubuntu packages needed for UniversiBO development
ant
openjdk-6-doc
openjdk-6-jdk
openjdk-6-source