Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Israel Perales ripper2hl

🎯
Focusing
View GitHub Profile
@ripper2hl
ripper2hl / nexus-setup.sh
Created Nov 15, 2019
Create a nexus server with docker
View nexus-setup.sh
#!/bin/bash
mkdir nexus && cd nexus
mkdir nexus-data
sudo chown -R 200 nexus-data
docker run -d -p 8081:8081 --name nexus -v nexus-data:/nexus-data sonatype/nexus3
@ripper2hl
ripper2hl / postgresql-docker.sh
Created Sep 30, 2019
Backup PostgreSQL database from a running Docker PostgreSQL container
View postgresql-docker.sh
docker exec container /usr/bin/pg_dump -U user --format=plain --no-owner --no-acl sepomex | sed -E 's/(DROP|CREATE|COMMENT ON) EXTENSION/-- \1 EXTENSION/g' > prod.sql
View wso2.log
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[2019-08-22 16:01:12,448] [EI-Core] INFO - CarbonCoreActivator Starting WSO2 Carbon...
[2019-08-22 16:01:12,454] [EI-Core] INFO - CarbonCoreActivator Operating System : Mac OS X 10.14.6, x86_64
[2019-08-22 16:01:12,454] [EI-Core] INFO - CarbonCoreActivator Java Home : /usr/local/Cellar/wso2ei-6.4.0/6.4.0/libexec/jdk/jdk1.8.0_172/jre
[2019-08-22 16:01:12,454] [EI-Core] INFO - CarbonCoreActivator Java Version : 1.8.0-adoptopenjdk
[2019-08-22 16:01:12,454] [EI-Core] INFO - CarbonCoreActivator Java VM : OpenJDK 64-Bit Server VM 25.71-b00,Oracle Corporation
[2019-08-22 16:01:12,454] [EI-Core] INFO - CarbonCoreActivator Carbon Home : /usr/local/Cellar/wso2ei-6.4.0/6.4.0/libexec
[2019-08-22 16:01:12,455] [EI-Core] INFO - CarbonCoreActivator Java Temp Dir : /usr/local/Cellar/wso2ei-6.4.0/6.4.0/libexec/tmp
[2019-08-22 16:01:12,455] [EI-Core] INFO - CarbonCoreActivator User : pe
@ripper2hl
ripper2hl / jboss-deployment-structure.xml
Created Sep 5, 2018
Ejemplo de como excluir la sobrescritura del wildfly en las librerias de un WAR, este archivo debe ir en la carpeta META-INF
View jboss-deployment-structure.xml
<jboss-deployment-structure>
<deployment>
<!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
<exclusions>
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
</exclusions>
</deployment>
</jboss-deployment-structure>
View spring-jpa.xsd
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://www.springframework.org/schema/data/jpa"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tool="http://www.springframework.org/schema/tool"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:repository="http://www.springframework.org/schema/data/repository"
targetNamespace="http://www.springframework.org/schema/data/jpa"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:import namespace="http://www.springframework.org/schema/tool" />
View spring-dwr-2.0.xsd
<?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
Lanzador de escritorio para gnome
View lanzador.desktop
#!/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
View log.js
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 Apr 20, 2016
Script en python que busca y encuentra agujeros en imagenes
View agujero.py
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 Feb 17, 2016
Hibernate Criteria to Lucene Full Text Query
View Example.java
@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");
You can’t perform that action at this time.