Skip to content

Instantly share code, notes, and snippets.

View ripper2hl's full-sized avatar
🎯
Focusing

Israel Perales ripper2hl

🎯
Focusing
View GitHub Profile
@ripper2hl
ripper2hl / colonias.json
Created March 16, 2023 03:07
Ejemplo del resultado obtenido al hacer una busqueda difusa con Hibernate Search
[
{
"id": 88767,
"nombre": "Cañada Blanca"
},
{
"id": 137448,
"nombre": "Cañada Blanca"
},
{
@ripper2hl
ripper2hl / restart_pods.md
Created December 28, 2022 07:38 — forked from schneefisch/restart_pods.md
How to restart all pods in a statefulset or deployment

Various ways to restart pods

Restart deployment

The most gracefull way is to trigger a restart for the deployment. In this case, a pod will only be terminated once the new pod is ready. It will slowly replace all pods one after the other.

kubectl rollout restart deployment <deployment-name>

Restart pods in a statefulset

@ripper2hl
ripper2hl / coco-colors.csv
Created November 18, 2021 05:51
Colors change coco movie
040404 20 0
040404 20 1
040404 20 2
053785 20 3
053a8c 20 4
044290 20 5
053d91 20 6
10378c 20 7
17327d 20 8
082363 20 9
@ripper2hl
ripper2hl / spring-cloud-sepomex.log
Created April 3, 2021 07:13
Spring Cloud Function (GCP adapter) throws Hibernate lazy could not initialize proxy - no session
israel-perales-pc:~/Documentos/git/sepomex$ mvn -Pgcp function:run
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< com.perales:sepomex-api >-----------------------
[INFO] Building sepomex-api 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> function-maven-plugin:0.9.1:run (default-cli) > compile @ sepomex-api >>>
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ sepomex-api ---
@ripper2hl
ripper2hl / audio-transcriptions-aws.java
Created December 12, 2020 02:58 — forked from balvinder294/audio-transcriptions-aws.java
Audio File Transcription for Transcribe API Aws == Tekraze.com
/********** Step 1 **********************
*********** File Imports ***************/
import com.amazonaws.services.transcribe.AmazonTranscribe;
import com.amazonaws.services.transcribe.AmazonTranscribeClientBuilder;
import com.amazonaws.services.transcribe.model.DeleteTranscriptionJobRequest;
import com.amazonaws.services.transcribe.model.GetTranscriptionJobRequest;
import com.amazonaws.services.transcribe.model.GetTranscriptionJobResult;
import com.amazonaws.services.transcribe.model.LanguageCode;
import com.amazonaws.services.transcribe.model.Media;
import com.amazonaws.services.transcribe.model.StartTranscriptionJobRequest;
@ripper2hl
ripper2hl / nexus-setup.sh
Created November 15, 2019 22:33
Create a nexus server with docker
#!/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 September 30, 2019 07:40
Backup PostgreSQL database from a running Docker PostgreSQL container
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
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 September 5, 2018 16:54
Ejemplo de como excluir la sobrescritura del wildfly en las librerias de un WAR, este archivo debe ir en la carpeta META-INF
<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>
@ripper2hl
ripper2hl / spring-jpa.xsd
Last active January 7, 2017 01:23
spring jpa xml
<?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" />