Skip to content

Instantly share code, notes, and snippets.

View axelhzf's full-sized avatar

Axel Hernández Ferrera axelhzf

View GitHub Profile
@axelhzf
axelhzf / verbosity.md
Created March 7, 2013 09:26
Java is too verbose

Getters y setter no son suficientemente verbose, mejor añadimos unos comentarios muy útiles ¬¬

    /**
     * @return the mail
     */
    public String getMail() {
        return mail;
    }
@axelhzf
axelhzf / gist:3192614
Created July 28, 2012 09:22
Grunt-reload monitorizar multiples archivos
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
less: {
all: {
src: '*.less',
dest: 'style.css'
}
},
@axelhzf
axelhzf / gist:2366575
Created April 12, 2012 11:11
Java sleep
try{
Thread.sleep(1000);//sleep for 1000 ms
}catch(ItrerruptedException ie){}
@axelhzf
axelhzf / gist:1466408
Created December 12, 2011 10:19
Borrar evaluaciones
#Borra las evaluaciones
delete from evaluacion_criterios;
delete from evaluacion_ceconomicos;
delete from Criterio;
delete from CEconomico;
delete from Evaluacion;
#Borra los tipos de evaluaciones
delete from tipoevaluacion_criterios;
delete from tipoevaluacion_ceconomicos;
@axelhzf
axelhzf / gist:1388669
Created November 23, 2011 13:32
Crear usuario en el AED y asignarle acceso a un procedimiento
set @nombre="NOMBRE";
set @procedimiento="ID_PROC";
set @password="PASSWORD";
insert into eadmon_seguridad.users values (@nombre, concat(@nombre,@password), true);
insert into eadmon_seguridad.usuario(usuario, nombre, apellidos) values (@nombre, @nombre, @nombre);
insert into eadmon_seguridad.rol values (@nombre, 'ROLE_AED_GESTOR');
insert into eadmon_seguridad.rol values (@nombre, 'ROLE_BDPROC_GESTOR');
insert into eadmon_seguridad.rol values (@nombre, 'ROLE_TIPODOC_GESTOR');
insert into eadmon_procedimientos.departamentos values (@nombre, @nombre);
insert into eadmon_procedimientos.departamento_seguridad(id_departamento) values (@nombre);
@axelhzf
axelhzf / CSV.java
Created November 22, 2011 15:14
CSV Action
package controllers;
import java.util.List;
import models.Agente;
import play.mvc.Controller;
public class CSV extends Controller {
public static void agentes(){
List<Agente> agentes = Agente.findAll();