Skip to content

Instantly share code, notes, and snippets.

View fabio-filho's full-sized avatar

Fábio Filho fabio-filho

View GitHub Profile
@fabio-filho
fabio-filho / bash.sh
Created April 3, 2024 13:39
Allow Jetbrain Suite to connect to Docker on Ubuntu
sudo usermod -aG docker $USER ;
sudo chmod a+rwx /var/run/docker.sock ;
@fabio-filho
fabio-filho / main.md
Created November 16, 2023 20:47
Configure the Keyboard Backlight Time-Out Interval in Ubuntu Linux
@fabio-filho
fabio-filho / index.html
Created March 22, 2023 23:03
Mentoria - Boilerplate JS
<!DOCTYPE html>
<html>
<body>
<button type="button" onclick="executar()">Executar</button>
<script>
function executar(){
const produto = prompt("Digite o produto")
@fabio-filho
fabio-filho / demo.ts
Last active February 11, 2023 17:50
typescript-basic review
// Variaveis
const nome: string = "Fabio";
let idade: number = 1;
idade = 2;
// Variáveis + null + undefined
let nomeQuePodeSerNull: string | null | undefined;
nomeQuePodeSerNull = null;
@fabio-filho
fabio-filho / exercícios.md
Last active March 30, 2023 23:32
Exercícios Mentoria

Exercícios da mentoria

1) Cálculo de média simples de 3 números;

  • Input

    • Ler média 1
    • Ler média 2
    • Ler média 3
  • Output

    • Média dos três números lidos;
@fabio-filho
fabio-filho / jenkinsClearQueue.java
Created January 18, 2023 01:29
Jenkins Clear Queue
Jenkins.instance.queue.clear()
@fabio-filho
fabio-filho / estrutura_de_repeticao.alg
Created January 14, 2023 17:55
Mentoria - Estruturas de Repetição
Algoritmo "estrutura de repeticao"
Var
indiceDoPara: inteiro
enquantoDeveRepetir: logico
enquantoContador: inteiro
enquantoDeveRepetirLido: inteiro
@fabio-filho
fabio-filho / watch_pod_logs.sh
Last active December 22, 2022 18:44
watch k8s pod logs
# usage: bash watch_pod_logs.sh "namespace" "pod_name (can be the full or partial name)" "container_name"
while [ : ]
do
pod_name=$(kubectl get pods --no-headers -o custom-columns=":metadata.name" -n $1 | grep $2 | tail -n 1)
echo "========================================================================================"
kubectl logs -n $1 $pod_name -c $3
sleep 1
done
@fabio-filho
fabio-filho / index.html
Created November 7, 2022 14:17
Popup Window Centralized by Parent Window
<html>
<button onclick="popupCenter('https://google.com', 400, 600);">
my popup
</button>
<script>
function popupCenter(url, w, h) {
const y = window.top.outerHeight / 2 + window.top.screenY - ( h / 2);
@fabio-filho
fabio-filho / readme.md
Last active October 25, 2022 14:37
linux - systemd - services

sudo vim /etc/systemd/system/my-server.service

/etc/systemd/system/my-server.service

[Unit]
Description=My Server
After=network.target
StartLimitIntervalSec=0

[Service]