Skip to content

Instantly share code, notes, and snippets.

View tfmeneses's full-sized avatar

Thiago Meneses tfmeneses

  • Brazil
View GitHub Profile
@tfmeneses
tfmeneses / git-tips.txt
Last active July 11, 2024 21:11
git rename commit/author message
git rebase -i HEAD~2
-> pick to edit :wq save it
git commit --amend --author="Thiago Fonseca Meneses <thiago@email>"
git rebase --continue
git push --force
# git to a new repo
cd
git checkout -b XXXX-branch
git remote add gitlab git@new.git
ssh-keygen -t ed25519 -C "<email>"
eval "$(ssh-agent -s)"
cat /home/thiago/.ssh/id_ed25519.pub
ssh -T git@github.com
1#
mkdir my-git-project
cd my-git-project
git init
git commit --allow-empty -m"Initialize repo to showcase gitlab-runner locally."
#2
Example .gitlab-ci.yml
image: alpine
test:
wsl –shutdown
cd C:\Users\thiago\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState
diskpart
select vdisk file="C:\Users\thiago\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\ext4.vhdx"
compact vdisk
exit
git remote --v
git remote rename origin old-origin
git remote add origin NEW.git
df -h
umount /dev/mapper/cs_compute2-home
lsof /home
fuser -mv /home
kill 3009 3011 3080 3082
fuser -mv /home
cd ~
pwd
fuser -mv /home
umount /dev/mapper/cs_compute2-home
export cookies #cookies.txt
wget --cookies=on --load-cookies cookies.txt --keep-cate -m https://<FILE>
openstack image list
openstack image save --file softex_20211215.raw 16b867a6-f1fb-45aa-ab34-ea06b138d4a1
openstack image create --disk-format qcow2 --container-format bare --public --file ./softex_20211215.raw softex-v20211215
How to capture All incoming HTTP GET traffic (or) requests
tcpdump -i any -s 0 -A 'tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420'
How to capture only HTTP POST requests Incoming to port 80 ( Apache/NGINX)
tcpdump -i <INTF> -s 0 -A 'tcp dst port 80 and tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504F5354'
sudo sh -c "truncate -s 0 /var/lib/docker/containers/*/*-json.log"