Skip to content

Instantly share code, notes, and snippets.

View danilogco's full-sized avatar

Danilo Carolino danilogco

View GitHub Profile
@danilogco
danilogco / gist:760503dbd6c3fd5c47fde16bcd88575d
Created September 12, 2024 01:44
Uninstall completely Lens K8s - Manjaro
To completely remove **Lens** (Kubernetes IDE) from **Manjaro**, follow these steps:
1. **Uninstall Lens:**
If you installed Lens via a package manager like `yay` or `pamac`, you can remove it using the following commands:
- For `pamac`:
```bash
sudo pamac remove lens-bin
```
@danilogco
danilogco / gist:eb2161c16a56c08c8cc38be8a1d5db88
Last active September 10, 2024 00:04
Linux vscode fix start via terminal
code() {
/usr/bin/code $1 --disable-accelerated-video-decode --disable-gpu
}
find ~/.cache/pypoetry -name '*.lock' -type f -delete
poetry env remove --all
poetry cache clear --all .
rm -rf $(poetry config cache-dir)/artifacts
poetry config keyring.enabled false
@danilogco
danilogco / gist:012baa66c06f5b3707fab723cbb869bc
Created August 27, 2024 23:46
add new pems to ec2 instance
chmod 400 /path_to_key/key.pem
ssh-keygen -y -f /path_to_key/key.pem
@danilogco
danilogco / test-doc-see-as-virus-by-clamav.txt
Created June 14, 2024 15:28 — forked from mikecastrodemaria/test-doc-see-as-virus-by-clamav.txt
A simple text file to be used as positive test for ClamAv virus scanner
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
@danilogco
danilogco / gist:4886491bd230beb05863699fbe2c9187
Last active December 18, 2023 08:43
UFW outgoing basic rule
sudo ufw default deny outgoing
sudo ufw allow out to any port 80 # http
sudo ufw allow out to any port 443 # https
sudo ufw allow out to any port 53 # dns
sudo ufw reload
sudo ufw status verbose
sudo ufw allow out to 20.201.28.151 port 22 proto tcp comment 'Allow SSH' # github
@danilogco
danilogco / crontab
Created December 18, 2023 05:42
Crontab Clamav
* */6 * * * rm -rf /var/log/clamav/freshclam.log && freshclam >/dev/null 2>&1
* */6 * * * clamscan -r -i / | grep FOUND >> /home/danilogco/virus-scan-reports/virus-scan-report-`date +"%d-%m-%Y"`.txt >/dev/null 2>&1
# create the folder virus-scan-reports in your home
nordvpn set technology openvpn
nordvpn set protocol tcp
nordvpn set threatprotectionlite on
nordvpn set killswitch on
nordvpn set lan-discovery enable
nordvpn set dns off
nordvpn connect us10460
nordvpn set autoconnect on us10460
@danilogco
danilogco / motd.sh
Created December 15, 2023 02:36
Custom motd.sh for Manjaro Linux
#! /usr/bin/env bash
# /etc/profile.d/motd.sh
# Basic info
HOSTNAME=`uname -n`
ROOT=`df -Ph | grep xvda1 | awk '{print $4}' | tr -d '\n'`
OS=`cat /etc/manjaro-release`
OS_VERSION=`lsb_release -r`
KERNEL=`uname -r`
UPTIME=`uptime`
@danilogco
danilogco / allow_ssh_clients.sh
Created December 14, 2023 21:23
ufw - allow connection from local ssh client
ufw allow from 192.168.0.201 to any port 22
ufw allow from 192.168.0.201 to any port 22 proto tcp