Skip to content

Instantly share code, notes, and snippets.

View gabrielfsousa's full-sized avatar

Gabriel Sousa gabrielfsousa

  • Hugo Boss
  • Leiria, Portugal
View GitHub Profile
@gabrielfsousa
gabrielfsousa / (1) script.js
Created June 6, 2023 11:57 — forked from nakov/(1) script.js
k6 Performance Test Script - Example
import { sleep, group, check } from "k6";
import http from "k6/http";
export let options = {
thresholds: {
// 95% of requests must finish within 500 ms & 99% within 1500 ms
http_req_duration: ['p(95) < 500', 'p(99) < 1500'],
},
};
@gabrielfsousa
gabrielfsousa / ckaexamprep.md
Last active March 11, 2023 06:59
CKA exam preparation

Preparation for CKA with Kubernetes version 1.17.1 on REDHAT 8

What i need to know for the exam ? 🏁

% Domain
08% Application Lifecycle Management
12% Installation, Configuration & Validation
19% Core Concepts
11% Networking
@gabrielfsousa
gabrielfsousa / awk_netstat.sh
Created October 22, 2021 09:47 — forked from staaldraad/awk_netstat.sh
AWK to get details from /proc/net/tcp and /proc/net/udp when netstat and lsof are not available
# Gawk version
# Remote
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}'
# Local
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}'
# No Gawk
# Local
grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){