Skip to content

Instantly share code, notes, and snippets.

View betray32's full-sized avatar

Camilo Contreras betray32

View GitHub Profile
@betray32
betray32 / AutomaticCommandLineSpringBoot.java
Last active May 27, 2019 13:57
Ejecucion automática SpringBoot
package cl.testing;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Repository;
/**
* HibernateTestingDao
*
@betray32
betray32 / ValidaRutChile.java
Last active June 5, 2019 22:38
Validador rut chileno
/**
* Validar rut chileno
*
* @param rut
* @return
*/
public static boolean validarRut(String rut) {
boolean validacion = false;
try {
@betray32
betray32 / TestJunitSpringBoot.java
Last active May 27, 2019 13:56
Junit 5 y SpringBootTest
package cl.testing.test;
import static org.junit.Assert.assertTrue;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@betray32
betray32 / DockerJenkins.sh
Last active October 8, 2019 03:22
Ejemplos con docker
docker run \
--rm \
-u root \
-p 8080:8080 \
-v "$PWD":/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \
jenkinsci/blueocean
@betray32
betray32 / FedoraSetup
Last active April 12, 2020 00:25
Configuración para fedora recién instalado
# CAMBIAR PASS ROOT
sudo su
passwd
# XBOX ONE CONTROLLER BLUETOOTH
https://blog.desdelinux.net/como-utilizar-mando-de-xbox-one-en-fedora-31-y-no-morir-en-el-intento/
# WIFI
dnf groupinstall "Development Tools"
dnf groupinstall "C Development Tools and Libraries"
@betray32
betray32 / InstallOpera
Created May 27, 2019 14:10
Instalar Opera
sudo su -
Import the public GPG key of the Opera browser.
rpm --import https://rpm.opera.com/rpmrepo.key
Add Opera browser repository to the system.
tee /etc/yum.repos.d/opera.repo <<REPO
[opera]
@betray32
betray32 / DWA582Linux
Last active September 20, 2019 17:16
DLINK DWA582 - LINUX - Desactualizado, puede no servir
Corregir tarjeta wifi en fedora - DLINK DWA582
Obtener version de drivers de network: lshw -class network
https://github.com/lwfinger/rtlwifi_new.git
-- Fedora , Centos
1. dnf groupinstall "Development Tools"
2. dnf groupinstall "C Development Tools and Libraries"
@betray32
betray32 / JobNotificaciones.java
Created August 2, 2019 22:17
Ejemplo con secciones del batch todo en el mismo archivo
package cl.poc.scheduler.batch;
import java.util.List;
import javax.sql.DataSource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
@betray32
betray32 / Axis2 Maven
Created August 9, 2019 00:02
Tips para axis2
AXIS2 - MAVEN
<!-- Axis2 -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-kernel</artifactId>
<version>${axis2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-http</artifactId>
package cl.bancoconsorcio.apis.helper;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import org.apache.log4j.Logger;
/**
* Aes
*