Skip to content

Instantly share code, notes, and snippets.

@napramirez
napramirez / attributes.rb
Created May 10, 2019 10:47 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@napramirez
napramirez / nginx.conf
Created November 26, 2018 10:37 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
# Advanced config for NGINX
server_tokens off;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options nosniff;
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
@napramirez
napramirez / openssl_commands.md
Created November 19, 2018 04:12 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
### Keybase proof
I hereby claim:
* I am napramirez on github.
* I am napramirez (https://keybase.io/napramirez) on keybase.
* I have a public key ASDj0S2QFiHYFTjkhsb7-VCG1ciqFw-SOLgM7ZAxB_UVXQo
To claim this, I am signing this object:
@napramirez
napramirez / get_keycloak_access_token.sh
Created April 25, 2018 09:09 — forked from adixchen/get_keycloak_access_token.sh
Get Keycloak access token via curl and pretty print it with python
curl \
-d 'client_id=YOUR_KEYCLOAK_CLIENT' \
-d 'username=YOUR_USERNAME' \
-d 'password=YOUR_PASSWORD' \
-d 'grant_type=password' \
'https://YOUR_KEYCLOAK_SERVER_HOST/auth/realms/YOUR_REALM/protocol/openid-connect/token' \
| python -m json.tool
@napramirez
napramirez / KongJwt.md
Created April 24, 2018 06:36 — forked from martinheld/KongJwt.md
Short example to use JWT with Kong

JWT Kong Example

  • Get and Start Kong and Co
git clone [email protected]:Mashape/docker-kong.git
cd docker-kong/compose
docker-compose up
  • Create Kong API Route
@napramirez
napramirez / ConvertLetsPemToPfx.sh
Created December 18, 2017 04:43
Convert LetsEncrypt Certificates to PFX
#!/bin/sh
#
# Copy of https://gist.githubusercontent.com/arichika/b1a1413b554734ae964f/raw/e657ad2dc4ddab60750d26e87add61f9b988d887/ConvertLetsPemToPfx.sh
#
pemsdir='/etc/letsencrypt/archive' # default search PEMs
pfxspath='/share/letsencrypt/archive' # dest of the PFXs
passfile='/share/letsencrypt/pass.txt' # password to be applied to the PFX file
for cnvifull in `find "${pemsdir}" -name 'cert*.pem' -o -name '*chain*.pem'`
@napramirez
napramirez / katerc
Created October 24, 2017 01:29
~/.kde/share/apps/config/katerc
[General]
Days Meta Infos=30
Modified Notification=false
Restore Window Configuration=true
Save Meta Infos=true
Show Full Path in Title=false
Show Status Bar=true
Startup Session=manual
[Kate Document Defaults]
@napramirez
napramirez / yakuakerc
Created October 24, 2017 00:50
~/.kde/share/config/yakuakerc
[Animation]
Frames=10
[Desktop Entry]
DefaultProfile=Shell.profile
[Dialogs]
FirstRun=false
[Favorite Profiles]
version: "2"
settings:
conductor_base: centos:7
services:
app:
from: centos:7
entrypoint: ['/usr/bin/entrypoint.sh']
privileged: true