Skip to content

Instantly share code, notes, and snippets.

View fulvi0's full-sized avatar
🏠
Working...

Carlos Antonio fulvi0

🏠
Working...
View GitHub Profile
@fulvi0
fulvi0 / jwtRS256.sh
Created April 15, 2019 22:05 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@fulvi0
fulvi0 / KongJwt.md
Last active January 14, 2019 21:46 — forked from martinheld/KongJwt.md
Short example to use JWT with Kong

JWT Kong Example

  • Get and Start Kong and Co
git clone git@github.com:Mashape/docker-kong.git
cd docker-kong/compose
docker-compose up
  • Create Kong API Route
@fulvi0
fulvi0 / iterm2-solarized.md
Created October 14, 2018 23:45 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@fulvi0
fulvi0 / k8s-pi.md
Created July 22, 2018 00:42 — forked from alexellis/k8s-pi.md
K8s on Raspbian

Kubernetes on (vanilla) Raspbian Lite

Yes - you can create a Kubernetes cluster with Raspberry Pis with the default operating system called Raspbian. This means you can carry on using all the tools and packages you're used to with the officially-supported OS.

Pre-reqs:

  • You must use an RPi 2 or 3 for use with Kubernetes
  • I'm assuming you're using wired ethernet (Wi-Fi also works, but it's not recommended)

Master node setup

@fulvi0
fulvi0 / wifi-user-data.yml
Created July 15, 2018 17:58
Flash hypriotos-rpi and config wifi
#cloud-config
# vim: syntax=yaml
#
# The current version of cloud-init in the Hypriot rpi-64 is 0.7.9
# When dealing with cloud-init, it is SUPER important to know the version
# I have wasted many hours creating servers to find out the module I was trying to use wasn't in the cloud-init version I had
# Documentation: http://cloudinit.readthedocs.io/en/0.7.9/index.html
# Set your hostname here, the manage_etc_hosts will update the hosts file entries as well
@fulvi0
fulvi0 / log_storage.sh
Last active June 30, 2018 03:24
A Script for compress, encrypt, and packages the server.log of Jboss EAP
#!/bin/sh
# A Script for compress, encrypt, and packages the server.log of Jboss EAP
# Maintainer: Carlos F. Antonio - fulvio.ac@gmail.com
# 2018-06-29
# log path of JBoss EAP
cd $JBOSS_HOME/standalone/log
# list old server.logs
HOST=`hostname -s`
# dockerfile to build image for JBoss EAP 6.4
# start from rhel 7.x
FROM centos
# file author / maintainer
MAINTAINER "Carlos F. Antonio" "cacespedes@apap.com.do"
# update OS
RUN yum -y update && \
@fulvi0
fulvi0 / origin-gce-hosts.yml
Last active June 27, 2018 21:39 — forked from sjenning/origin-gce-hosts.md
GCE openshift-ansible inventory
[OSEv3:children]
masters
etcd
nodes
[OSEv3:vars]
openshift_master_default_subdomain=origin.apap.com.do
ansible_ssh_user=root
ansible_become=yes
openshift_master_cluster_method=native
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
sed -rne '/16:00:00/,/18:54:00/ p' u_ex180110.log | grep 'WS_AUTHENTICATION_CONTACT' > WS_AUTENTICACION_CONTACT_cut_01102018.log
Empaquetar y comprimir linux UNix
tar -cvf - <dir/file> | gzip --best > compressedFile.tar.gz
tail -f /path/to/log | awk '
/INFO/ {print "\033[32m" $0 "\033[39m"}
/SEVERE/ {print "\033[31m" $0 "\033[39m"}'