Skip to content

Instantly share code, notes, and snippets.

View gifflet's full-sized avatar
🦅

Guilherme Sousa gifflet

🦅
View GitHub Profile
@gifflet
gifflet / add-agent-to-k3d-cluster.MD
Last active January 31, 2024 18:31
Adding an agent to a K3d cluster

Requirements

Docker

curl -fsSL get.docker.com | bash

K3d

@gifflet
gifflet / pushing-pulling-with-git-lfs.MD
Last active January 16, 2024 17:59
Pushing or Pulling with Git LFS (Large File Storage)

Adding files to be tracked by lfs and pushing it to remote repository

git lfs track "*.psd"

git add .gitattributes

git add file.psd

git commit -m "Add design file"
@gifflet
gifflet / first-vm-execution-and-snapshot-setup.MD
Last active January 10, 2024 16:07
QEMU VM with snapshot setup + samba file sharing

Requirements

  • telnet
  • qemu
  • samba

Command to install the requirements:

apt-get update && \
  apt-get install -y \
@gifflet
gifflet / importing-go-packages.MD
Last active November 29, 2023 14:52
Importing Go packages in a module

Importing

image

To import the package above the following command is required to be executed in the project root directory:

go get github.com/traefik/traefik/v2

If you want to get an specific version of the package provide the commit hash this way:

@gifflet
gifflet / script.bat
Created October 26, 2023 20:24
Transfering files from machines using robocopy
robocopy \\<SOURCE_SERVER_IP>\<SHARED_FOLDER_PATH> <DESTINATION_FOLDER_PATH> /E /Z /ZB /R:5 /W:5 /TBD /NP /MT:16 /compress
@gifflet
gifflet / old-release-ubuntu-sources.sh
Created October 2, 2023 15:43
Change sources repository file to old releases in Ubuntu
cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i -re 's/([a-z]{2}.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update
@gifflet
gifflet / get-chrome-download-link.ps1
Created September 21, 2023 14:21
Get chrome installer specific version download link (from squirrelistic.com)
@gifflet
gifflet / create.sql
Created September 20, 2023 20:48
db-scheduler SQL init script
create table scheduled_tasks (
task_name text not null,
task_instance text not null,
task_data bytea,
execution_time timestamp with time zone not null,
picked BOOLEAN not null,
picked_by text,
last_success timestamp with time zone,
last_failure timestamp with time zone,
consecutive_failures INT,
@gifflet
gifflet / README.md
Last active August 10, 2023 15:06
Adicionar um novo mapeamento de porta a um cluster K3D existente

Considerando que o seguinte serviço foi criado:

apiVersion: v1
kind: Service
metadata:
  name: postgres-outside-cluster
  namespace: default
spec:
 type: NodePort
@gifflet
gifflet / deploy.sh
Created July 4, 2023 16:08
Maven Multi Module Deploy Scripts
#!/bin/bash
repository_url=$1 # Maven repository URL
username=$2 # Nome de usuário para autenticação no repositório
password=$3 # Senha para autenticação no repositório
# Configurar o arquivo settings.xml com as credenciais
cat >settings.xml <<EOF
<settings>
<servers>