Skip to content

Instantly share code, notes, and snippets.

View AnythingLinux's full-sized avatar
🏠
Working from home

Karim AnythingLinux

🏠
Working from home
View GitHub Profile
@AnythingLinux
AnythingLinux / package.json debugging gatsby and npm
Last active February 19, 2022 20:47
package.json debugging
gatsby-plugin-page-creator@"*"
npm install gatsby-plugin-page-creator@"*"
yarn add gatsby-plugin-page-creator@"*"
yarn add react@"*"
npm add react@"*"
yarn add react-dom@"*"
npm install react-dom@"*"
@AnythingLinux
AnythingLinux / USDT Node Setup Using OmniCore Staging Tree
Last active February 17, 2022 08:24
USDT Node Setup Using OmniCore
apt update -y && apt-get upgrade -y
apt update -y
apt install build-essential checkinstall
apt install ubuntu-restricted-extras
apt install software-properties-common
apt install apt-show-versions
apt upgrade -o APT::Get::Show-Upgraded=true
apt-show-versions | grep upgradeable
add-apt-repository ppa:git-core/ppa
apt update -y && apt upgrade -y
nano Gemfile
gem 'bundler-auto-update'
gem install bundler-auto-update
bundle-auto-update -c rake test:all
https://github.com/UbuntuEvangelist/bundler-auto-update
swapoff /swapfile
dd if=/dev/zero of=/swapfile bs=5M count=2048 oflag=append conv=notrunc
mkswap /swapfile
swapon /swapfile
reboot
@AnythingLinux
AnythingLinux / Ruby Install Ubuntu 20.04 LTS
Created January 16, 2022 20:17
Ruby Install Ubuntu 20.04 LTS
sudo -i
apt install gcc autoconf curl g++ gnupg automake bison libc6-dev libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev pkg-config sqlite3 zlib1g-dev libtool libyaml-dev make libgmp-dev libreadline-dev libssl-dev
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable --rails
source /etc/profile.d/rvm.sh
usermod -a -G rvm $USER
rvm user gemsets
rvm install 2.6.5
rvm use 2.6.5 --default
ruby -v
@AnythingLinux
AnythingLinux / Enable SSH CentOS
Last active January 11, 2022 01:52
Enable SSH CentOS
2 shutdown -r 0
3 ping 8.8.8.8 -t
4 ping 8.8.8.8
5 shutdown -r 0
6 free
7 shutdown -r 0
8 shutdown 0
9 fail2ban
10 fail2ban-client
11 fail2ban-client status
@AnythingLinux
AnythingLinux / RVM Setup For Ubuntu 20.04 LTS
Last active January 11, 2022 12:22
RVM Setup For Ubuntu 20.04 LTS
sudo -i
apt install software-properties-common
apt-add-repository -y ppa:rael-gc/rvm
apt update -y && apt upgrade -y
apt install rvm
source /etc/profile.d/rvm.sh
usermod -a -G rvm $USER
rvm user gemsets
rvm install ruby
OR
@AnythingLinux
AnythingLinux / How To Install Brave Ubuntu 20.04 LTS
Created January 7, 2022 13:51
How To Install Brave Ubuntu
apt install apt-transport-https curl
curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list
apt update
apt install brave-browser
@AnythingLinux
AnythingLinux / PostgreSQL and pgAdmin4 in Ubuntu 24.04 Linux
Last active April 21, 2025 18:26
PostgreSQL and pgAdmin4 in Ubuntu 24.04 Linux
apt update -y && apt-get upgrade -y
apt list --upgradable
apt upgrade -y && apt update -y
apt install build-essential checkinstall
apt install ubuntu-restricted-extras
apt install software-properties-common
apt install apt-show-versions
apt upgrade -o APT::Get::Show-Upgraded=true
apt-show-versions | grep upgradeable
@AnythingLinux
AnythingLinux / Basic DoS Protection For Ubuntu Linux
Created December 30, 2021 17:29
DoS Protection For Ubuntu Linux
sudo apt-get update
sudo apt-get install denyhosts
sudo apt-get install fail2ban
sudo service denyhosts restart
sudo service fail2ban restart
sudo service fail2ban status
sudo iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m limit --limit 50/minute --limit-burst 200 -j ACCEPT
sudo iptables -A INPUT -m state --state RELATED,ESTABLISHED -m limit --limit 50/second --limit-burst 50 -j ACCEPT
sudo iptables -A INPUT -i eth0 -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j DROP
sudo iptables -A INPUT -i eth0 -p tcp -m tcp --tcp-flags FIN,SYN FIN,SYN -j DROP