Skip to content

Instantly share code, notes, and snippets.

Avatar
🥭
Mango fruit

Juan Pablo Prado juanpabloprado

🥭
Mango fruit
View GitHub Profile
@juanpabloprado
juanpabloprado / jetbrains-live-templates.md
Last active Sep 22, 2021 — forked from kmcquade/jetbrains-live-templates.md
My Intellij Live Templates || VSCode Code snippets for Terraform
View jetbrains-live-templates.md
@juanpabloprado
juanpabloprado / docker-compose.yml
Created Oct 28, 2020 — forked from pantsel/docker-compose.yml
example docker-compose.yml for kong, postgres and konga
View docker-compose.yml
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
@juanpabloprado
juanpabloprado / config.xml
Created Oct 13, 2019 — forked from g0t4/config.xml
Module 2 - What am I? Get this job loaded into Jenkins and running, there are two problems you'll encounter. Raw
View config.xml
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="git@2.5.2">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
@juanpabloprado
juanpabloprado / Dockerfile
Created Oct 9, 2019 — forked from ju2wheels/Dockerfile
Docker Dockerfile reference template
View Dockerfile
# Last updated: 08/24/2916
#
# Total instructions available: 18
#
# https://docs.docker.com/engine/reference/builder/
#
# You can use a .dockerignore file in the same context directory as
# your Dockerfile to ignore files in the context before sending them
# to the Docker daemon for building to speed up building.
@juanpabloprado
juanpabloprado / docker-compose.yml
Created Jul 9, 2019
Drupal with Postgres docker-compose for local development
View docker-compose.yml
version: "3.7"
services:
drupal:
image: drupal:8.7
ports:
- 8080:80
volumes:
- drupal-modules:/var/www/html/modules
- drupal-profiles:/var/www/html/profiles
- drupal-themes:/var/www/html/themes
@juanpabloprado
juanpabloprado / SpecializedFormattersJShell.java
Last active Apr 27, 2019
Specialized Formatters on the Java Shell tool
View SpecializedFormattersJShell.java
jshell> LocalDateTime ldt = LocalDateTime.now();
ldt ==> 2019-04-27T16:56:46.267683
jshell> String dateTime = ldt.format(DateTimeFormatter.ofPattern("yyyyMMdd"));
dateTime ==> "20190427"
jshell> import java.nio.file.Path;
jshell> import java.nio.file.Paths;
@juanpabloprado
juanpabloprado / LocalDateTimeLocalizedFormatJShell.java
Last active Apr 27, 2019
Localized formatting for LocalDateTime on the Java Shell tool
View LocalDateTimeLocalizedFormatJShell.java
jshell> // Passing Formatters to LocalDateTime format method
jshell> LocalDateTime ldt = LocalDateTime.now();
ldt ==> 2019-04-27T16:53:28.272418
jshell> ldt.format(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.SHORT));
$82 ==> "4/27/19, 4:53 PM"
jshell> ldt.format(DateTimeFormatter.ofLocalizedTime(FormatStyle.SHORT));
$83 ==> "4:53 PM"
@juanpabloprado
juanpabloprado / LocalTimeLocalizedFormatJShell.java
Last active Apr 27, 2019
Localized formatting for LocalTime on the Java Shell tool
View LocalTimeLocalizedFormatJShell.java
jshell> // Passing Formatter to LocalTime format method
jshell> import java.time.LocalTime;
jshell> LocalTime lt = LocalTime.now();
lt ==> 16:48:31.159343
jshell> "SHORT: " + lt.format(DateTimeFormatter.ofLocalizedTime(FormatStyle.SHORT));
$77 ==> "SHORT: 4:48 PM"
@juanpabloprado
juanpabloprado / LocalDateLocalizedFormatJShell.java
Last active Apr 27, 2019
Localized formatting for LocalDate on the Java Shell tool
View LocalDateLocalizedFormatJShell.java
jshell> // Localized formatting for LocalDate
jshell> import java.time.LocalDate;
jshell> LocalDate ld = LocalDate.now();
ld ==> 2019-04-27
jshell> import java.time.format.FormatStyle;
jshell> "SHORT: " + ld.format(DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT));
@juanpabloprado
juanpabloprado / LocalDateTimeFormattersJShell.java
Last active Apr 27, 2019
LocalDateTime Formatters on the Java Shell tool
View LocalDateTimeFormattersJShell.java
jshell> import java.util.ArrayList;
jshell> import java.time.format.DateTimeFormatter; ^
jshell> ArrayList<DateTimeFormatter> ldtFormattersList = new ArrayList<>();
ldtFormattersList ==> []
jshell> ldtFormattersList.add(DateTimeFormatter.BASIC_ISO_DATE);
$57 ==> true