Skip to content

Instantly share code, notes, and snippets.

View juandbc's full-sized avatar

Juan David Bermudez Celedon juandbc

View GitHub Profile
@juandbc
juandbc / spanish.json
Last active October 18, 2021 18:42
Spanish JSON resume
{
"meta": {
"theme": "stackoverflow"
},
"basics": {
"name": "Juan David Bermudez Celedon",
"label": "Software developer at Wolox",
"picture": "",
"email": "juanbermucele@gmail.com",
"phone": "+57(312)7598435",
@juandbc
juandbc / resume.json
Last active October 5, 2023 19:59
JSON resume
{
"meta": {
"theme": "spartacus"
},
"basics": {
"name": "Juan Bermudez",
"label": "Java Developer",
"picture": "",
"email": "juanbermucele@gmail.com",
"phone": "+57(312)7598435",
@juandbc
juandbc / app.sh
Created April 18, 2021 20:15
Spring boot as sysv service
#!/bin/sh
### BEGIN INIT INFO
# Provides:
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: app description
# Description: app description
### END INIT INFO
@juandbc
juandbc / disableServices.ps1
Last active June 29, 2024 08:11
Script to disable unnecesary Windows services and improve the performance.
#####################################################################################################################
# Script to disable unnecesary Windows services and improve the performance.
#
# This use the command Set-Service, you can check the below link for more information
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/set-service?view=powershell-7
#
# You should check what service you want to disable, like Windows defender, Windows Search
# or Seclogon (necesary for some programs or games).
# Some services were removed in Windows 10.
#####################################################################################################################
#
# This is a little script to populate Firefox Sync with
# fake password records. Use it like so:
#
# $> pip install PyFxA syncclient cryptography
# $> python ./upload_fake_passwords.py 20
#
# It will prompt for your Firefox Account email address and
# password, generate and upload 20 fake password records, then
# sync down and print all password records stored in sync.
@juandbc
juandbc / regexpr.txt
Last active September 5, 2019 13:51
Lista de expresiones regulares
NUMERO CON O SIN FORMATO DE MILES
(?:^(?:[0-9]{1,3})(?:(?:\.{0,1}(?:[0-9]{3}))\b)+)$|(^[0-9]+$)
@juandbc
juandbc / executePLSqlFunctions.java
Last active July 24, 2019 18:39
How to execute stored procedure with JDBC
import java.sql.*;
public class Main {
public static void main(String[] args) {
String sql = "{? = call fn_test()}";
try (Connection conn = getConnection(); CallableStatement callableStatement = conn.prepareCall(sql);
PreparedStatement preparedStatement = conn.prepareStatement("select fn_test()")) {
// Execute stored procedured CallableStatement (recommend way)
callableStatement.registerOutParameter(1, Types.VARCHAR);
@juandbc
juandbc / JSF-2.2-namespace.txt
Created April 28, 2018 21:55
Namespaces for JavaServerFaces
Old namespace JSF 2.2 namespace
http://java.sun.com/jsf/core http://xmlns.jcp.org/jsf/core
http://java.sun.com/jsf/html http://xmlns.jcp.org/jsf/html
http://java.sun.com/jsf/facelets http://xmlns.jcp.org/jsf/facelets
http://java.sun.com/jsf/composite http://xmlns.jcp.org/jsf/composite
http://java.sun.com/jsp/jstl/core http://xmlns.jcp.org/jsp/jstl/core
http://java.sun.com/jsp/jstl/functions http://xmlns.jcp.org/jsp/jstl/functions
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
@juandbc
juandbc / persistence.xml
Created July 30, 2017 18:14 — forked from jesuino/persistence.xml
Wildfly Datasource and JPA Descriptor (persistence.xml)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="primary">
<jta-data-source>java:jboss/datasources/PeopleDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.transaction.flush_before_completion" value="true"/>
</properties>
</persistence-unit>
@juandbc
juandbc / wildfly_httpcache.md
Last active July 26, 2017 05:18 — forked from remibantos/wildfly_httpcache.md
Wildfly 8 - HTTP cache headers tuning for rich client web application

Introduction

This Gist describes how to tune HTTP browser cache expiration for static contents served by Wildfly Undertow web server, as per RFC-2616 section 13.

Wildfly configuration

Description

In order to change HTTP browser cache behavior, a "Cache-Control" HTTP header has to be added to static content HTTP responses returned by Undertow.

Undertow subsystem configuration (standalone.xml)