Skip to content

Instantly share code, notes, and snippets.

View ripper2hl's full-sized avatar
🎯
Focusing

Israel Perales ripper2hl

🎯
Focusing
View GitHub Profile
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
~ Copyright 2006 the original author or authors.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
@ripper2hl
ripper2hl / lanzador.desktop
Created May 30, 2016 16:37
Lanzador de escritorio para gnome
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=command to run here
Name=visible name here
Comment=comment here
Icon=icon path here
@ripper2hl
ripper2hl / log.js
Created May 11, 2016 17:15
Error log
BLOCK_TAB: *** Method: validateTabs ***functions_banorte.js;wae769b4fce8a70762:14:5
New page title is btt.js;waa94915c23e139c56:8:19051
TypeError: _2f1.node.getAttribute is not a function
Traza de la pila:
dojo.parser</this.parse/scan/<@https://www.banorte.com/BanorteBttCommonStatic/js/dojo/dojo_BTT.js;wa3ef56eb71d26022d:14:98112
.forEach@https://www.banorte.com/BanorteBttCommonStatic/js/dojo/dojo_BTT.js;wa3ef56eb71d26022d:14:17694
scan@https://www.banorte.com/BanorteBttCommonStatic/js/dojo/dojo_BTT.js;wa3ef56eb71d26022d:14:98061
dojo.parser</this.parse@https://www.banorte.com/BanorteBttCommonStatic/js/dojo/dojo_BTT.js;wa3ef56eb71d26022d:14:98896
.renderPageHandler@https://www.banorte.com/BanorteBttCommonStatic/js/com/ibm/btt/btt.js;waa94915c23e139c56:8:19380
dojo.hitch/<@https://www.banorte.com/BanorteBttCommonStatic/js/dojo/dojo_BTT.js;wa3ef56eb71d26022d:14:15210
@ripper2hl
ripper2hl / agujero.py
Created April 20, 2016 05:32
Script en python que busca y encuentra agujeros en imagenes
from PIL import Image;
from PIL import ImageDraw;
import numpy as np;
from sys import argv;
import random;
VERTICAL = 1;
HORIZONTAL = 0;
MAXIMA = 1;
MINIMA = 0;
@ripper2hl
ripper2hl / Example.java
Last active February 17, 2016 18:21
Hibernate Criteria to Lucene Full Text Query
@Transactional(readOnly = true)
public List<Cliente> example(Cliente cliente){
Session session = em.unwrap(Session.class);
FullTextSession fullTextSession = org.hibernate.search.Search.getFullTextSession( session );
Criteria criteria = fullTextSession.createCriteria(Cliente.class);
Example example = Example.create(cliente)
.excludeZeroes()
.ignoreCase()
.enableLike(MatchMode.ANYWHERE)
.excludeProperty("idCliente");
@ripper2hl
ripper2hl / UtilXml.java
Created January 26, 2016 23:27
Manipulacion de XML en formato String con JDOM2
import java.io.IOException;
import java.io.StringReader;
import java.util.Calendar;
import java.util.Date;
import org.apache.log4j.Logger;
import org.jdom2.Attribute;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.JDOMException;
@ripper2hl
ripper2hl / mvc-dispatcher-servlet.xml
Created November 28, 2015 00:34
Todo spring xml configuracion
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
@ripper2hl
ripper2hl / mvc-dispatcher-servlet.xml
Created November 25, 2015 19:29
Todo spring datasource configuracion
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
@ripper2hl
ripper2hl / mvc-dispatcher-servlet.xml
Created November 24, 2015 00:34
Todo archivo de configuracion de spring basico
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
@ripper2hl
ripper2hl / web.xml
Created November 23, 2015 23:51
Todo web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<display-name>todo</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>