Skip to content

Instantly share code, notes, and snippets.

View pjosalgado's full-sized avatar
💻
Switching between GitHub and GitLab

Paulo Salgado pjosalgado

💻
Switching between GitHub and GitLab
View GitHub Profile
@pjosalgado
pjosalgado / keybase.md
Created December 17, 2023 02:10
keybase.md

Keybase proof

I hereby claim:

  • I am pjosalgado on github.
  • I am pjosalgado (https://keybase.io/pjosalgado) on keybase.
  • I have a public key ASBU_LZ8Qzk22teFuSUH9HCXNN8CP0r1pp5c_C3JV4qIzQo

To claim this, I am signing this object:

@pjosalgado
pjosalgado / letsencrypt-jetty.sh
Created March 28, 2018 19:31 — forked from xkr47/letsencrypt-jetty.sh
How to use Letsencrypt certificate & private key with Jetty
# input: fullchain.pem and privkey.pem as generated by the "letsencrypt-auto" script when run with
# the "auth" aka "certonly" subcommand
# convert certificate chain + private key to the PKCS#12 file format
openssl pkcs12 -export -out keystore.pkcs12 -in fullchain.pem -inkey privkey.pem
# convert PKCS#12 file into Java keystore format
keytool -importkeystore -srckeystore keystore.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.jks
# don't need the PKCS#12 file anymore
@pjosalgado
pjosalgado / check_docker_container.sh
Last active May 25, 2023 17:33 — forked from ekristen/check_docker_container.sh
Bash Script to Check the Status of a Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# Edited by: Paulo José de Oliveira Salgado
# Email: paulo@technosoftware.com.br
@pjosalgado
pjosalgado / dabblet.css
Created October 25, 2017 20:51
curso-html5-css3-alura-exercicio-2-6-5
min-height: 100%;
background-color: black;
background-image: linear-gradient(to right, black, #C00, black);
background-repeat: no-repeat;
background-size: 80% 5px;
background-position: 50% 50%;
@pjosalgado
pjosalgado / dabblet.css
Last active October 25, 2017 20:20 — forked from anonymous/dabblet.css
curso-html5-css3-alura-exercicio-2-4-9
.face {
display: block;
width: 200px;
height: 200px;
position: absolute;
top: 0;
left: 0;
}
.frente {
background-color: red;
@pjosalgado
pjosalgado / dabblet.css
Last active October 25, 2017 18:31
curso-html5-css3-alura-exercicio-1-10-13
div {
width: 100px;
height: 100px;
/* Para deixar o texto centralizado na div,
podemos colocar um line-height igual à altura
dela. Só funciona bem se o texto tiver uma
linha só.
*/
line-height: 100px;
text-align: center;
@pjosalgado
pjosalgado / dabblet.css
Last active October 25, 2017 18:31
curso-html5-css3-alura-exercicio-1-10-12
div {
width: 100px;
height: 100px;
/* Para deixar o texto centralizado na div,
podemos colocar um line-height igual à altura
dela. Só funciona bem se o texto tiver uma
linha só.
*/
line-height: 100px;
text-align: center;
@pjosalgado
pjosalgado / jks-to-nginx-command-list
Last active August 8, 2020 14:10 — forked from ilguzin/gist:6606011
How to convert Java Key Store file to pem/key for NGINX.
1. Convert our ".jks" file to ".p12" (PKCS12 keystore format):
keytool -importkeystore -srckeystore { java-keystore.jks } -destkeystore { pkcs12-keystore.p12 } -deststoretype PKCS12
2. Extract pem (certificate) from ".p12" keystore file:
openssl pkcs12 -nokeys -in { pkcs12-keystore.p12 } -out { certificate-chain.pem }
3. Extract unencrypted key file from ".p12" keystore file:
openssl pkcs12 -nocerts -nodes -in { pkcs12-keystore.p12 } -out { unencrypted-key.key }