Skip to content

Instantly share code, notes, and snippets.

View andremoriya's full-sized avatar
🎯
Focusing

André Heidi Moriya andremoriya

🎯
Focusing
View GitHub Profile
English short name lower case Alpha-2 code Alpha-3 code Numeric code ISO 3166-2
Afghanistan AF AFG 004 ISO 3166-2:AF
Åland Islands AX ALA 248 ISO 3166-2:AX
Albania AL ALB 008 ISO 3166-2:AL
Algeria DZ DZA 012 ISO 3166-2:DZ
American Samoa AS ASM 016 ISO 3166-2:AS
Andorra AD AND 020 ISO 3166-2:AD
Angola AO AGO 024 ISO 3166-2:AO
Anguilla AI AIA 660 ISO 3166-2:AI
Antarctica AQ ATA 010 ISO 3166-2:AQ
@andremoriya
andremoriya / docker-commands.txt
Last active June 26, 2020 14:39
Some docker commands
Removing file
docker exec [-u root] -it [container name or id] rm [container path]
Accessing container
docker exec -it [container name or id] bash
Remove unused data
@andremoriya
andremoriya / wildfly_httpcache.md
Created April 22, 2020 19:51 — 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)

@andremoriya
andremoriya / launch.json
Created April 13, 2020 15:11
My chrome debugger configuration
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Chrome Anonimus",
@andremoriya
andremoriya / git-svn.txt
Created September 4, 2019 02:28
Usando git svn no Debian 10
Download do tarball do git pelo link https://mirrors.edge.kernel.org/pub/software/scm/git/
A versão em questão utilizada é a 2.23.0
Descompactada o tar.gz e acesse a pasta.
Para instalação segui os passos do link https://git-scm.com/book/en/v2/Getting-Started-Installing-Git,
na seção *Installing from Source*
Após finalizada a instalação, precisei rodar os seguintes comandos
@andremoriya
andremoriya / simple_pgadmin4_docker.txt
Created September 3, 2019 00:37
Simple pgAdmin4 on docker
docker network create --driver bridge pgnetwork
docker volume create --driver local --name=pgAdmin4Volume
docker run --name pgadmin4 --volume=pgAdmin4Volume --network=pgnetwork -p 15432:80 -e "PGADMIN_DEFAULT_EMAIL=andremoriya@gmail.com" -e "PGADMIN_DEFAULT_PASSWORD=admin" -d dpage/pgadmin4
@andremoriya
andremoriya / docker_debian_9.txt
Last active June 22, 2019 02:29
Instalando docker no debian 9
1. Instalar pacotes para permitir aptusar um repositório via HTTPS:
# apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
2. Adicionar chave GPG oficial do Docker:
# curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
2.1 Verifique se você tem agora a chave com a impressão digital 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, procurando os últimos 8 caracteres da impressão digital.
@andremoriya
andremoriya / SimpleXmlReader.java
Last active December 14, 2018 11:37
This example read a gpx file and get the lat/long in the trkpt and wpt tag.
import java.io.File;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@andremoriya
andremoriya / README.MD
Created December 8, 2018 10:13 — forked from giordanocardillo/README.MD
Remove Office 2016 Product Key
  1. Open a command prompt as Administrator
  2. In the command prompt, type the following:
  • Office 2016 (32-bit) on a 32-bit version of Windows

    cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /dstatus

  • Office 2016 (32-bit) on a 64-bit version of Windows

    cscript "C:\Program Files (x86)\Microsoft Office\Office16\OSPP.VBS" /dstatus

  • Office 2016 (64-bit) on a 64-bit version of Windows

@andremoriya
andremoriya / log4j2.xml
Last active August 13, 2018 12:40
A log4j2.xml example
<?xml version="1.0" encoding="UTF-8"?>
<Configuration monitorInterval="2" status="warn">
<Properties>
<Property name="basePath">/dev/logs</Property>
</Properties>
<Loggers>
<Root>
<AppenderRef ref="console" />
</Root>
<Logger name="org.springframework.web"