Skip to content

Instantly share code, notes, and snippets.

@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.
"replaces": {
"smarty/smarty": "v3.1.11"
},
@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
@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 / 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 / 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 / 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 / gist:7889281
Created December 10, 2013 11:34
groups.py
from smart_m3.m3_kp_api import m3_kp_api
class GroupManager(object):
def __init__(self, kp:m3_kp_api):
self.kp = kp
def create(self, name):
pass
def delete(self, uri):
pass
def add_user(self, group_uri, user_uri):
@dbellettini
dbellettini / Configuration.php
Created December 12, 2013 14:44
CavejaToshBundle configuration
<?php
namespace Caveja\Bundle\ToshlBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files
*
@dbellettini
dbellettini / WeirdConditions.java
Created December 27, 2013 11:47
Weird conditions
List<Element> parameters = root.getChildren("parameter", ns);
int ip;
for(ip=0;ip<parameters.size();ip++)
{
if( parameters.get(ip).getAttributeValue("name").equalsIgnoreCase("new_results"))
{
break;
}
}
if(!(ip<parameters.size()))