Skip to content

Instantly share code, notes, and snippets.

[Thu Oct 14 20:51:40 2010] [error] [client 127.0.0.1] PHP Deprecated: Function ereg() is deprecated in /home/davide/workspace/universibo2/universibo/classes/User.php on line 115, referer: http://www.universibo.test/index.php
[Thu Oct 14 20:51:40 2010] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://www.universibo.test/index.php
[Thu Oct 14 20:51:40 2010] [error] [client 127.0.0.1] PHP 1. {main}() /home/davide/workspace/universibo2/htmls/index.php:0, referer: http://www.universibo.test/index.php
[Thu Oct 14 20:51:40 2010] [error] [client 127.0.0.1] PHP 2. Receiver->main() /home/davide/workspace/universibo2/htmls/index.php:134, referer: http://www.universibo.test/index.php
[Thu Oct 14 20:51:40 2010] [error] [client 127.0.0.1] PHP 3. FrontController->executeCommand() /home/davide/workspace/universibo2/htmls/index.php:127, referer: http://www.universibo.test/index.php
[Thu Oct 14 20:51:40 2010] [error] [client 127.0.0.1] PHP 4. Login->execute() /home/davide/workspace/universibo2/framework/Fr
@dbellettini
dbellettini / mandamail.php
Created November 3, 2010 11:08
Quanto ero ingenuo da giovine :D
<?php
/*
QUESTO PROGRAMMA SUPPONE CHE IL CONTROLLO DEI DATI SIA EFFETTUATO
TRAMITE JAVASCRIPT LATO CLIENT
*/
//attenzione, questo parametro dipende dal nome del campo e-mail
//inserito nell'html
$emailfield="EMail";
@dbellettini
dbellettini / stack-trace.txt
Created November 25, 2010 09:51
Stack trace of php symfony.phar
execve("/usr/bin/php", ["php", "symfony.phar"], [/* 21 vars */]) = 0
brk(0) = 0x1e6d000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f43ccc42000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=155183, ...}) = 0
mmap(NULL, 155183, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f43ccc1c000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
@dbellettini
dbellettini / Informazioni sul TouchPad
Created February 3, 2011 08:16
Informazioni touchpad
I: Bus=0011 Vendor=0002 Product=0007 Version=01b1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input10
U: Uniq=
H: Handlers=mouse0 event10
B: EV=b
B: KEY=420 610000 0 0 0 0
B: ABS=11000003
@dbellettini
dbellettini / poller.js
Created July 22, 2011 12:47
Javascript jQuery JSON polling
function Poller (url, callback) {
this.url = url;
this.callback = callback;
this.start = function(interval) {
var url = this.url;
var callback = this.callback;
var fn = function() {
jQuery.getJSON(url, callback);
@dbellettini
dbellettini / makeDelayedFunction.js
Created September 6, 2011 10:04
Delayed function
function makeDelayedFunction(oldFunction, delay) {
var obj = { timeout: false };
return function () {
if (obj.timeout) {
clearTimeout(obj.timeout);
}
obj.timeout = setTimeout(function () {
obj.timeout = false;
@dbellettini
dbellettini / gist:1779408
Created February 9, 2012 11:26
weird foreach
Set<Author> authorsSet = new HashSet<Author>();
try {
for(int i=0; ; i++) {
// checking if author already exists in the DB
Author author = authorDAO.findAuthorByName(authors[i]);
if (author == null) {
author = new Author();
author.setName(authors[i]);
}
@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
@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 / 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]