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
HIRE Me For Your Project Support :)
Telegram: https://t.me/LinuxGun
#!/bin/bash
# Completely Remove Apache Ubuntu
service apache2 stop
apt purge apache2
apt remove apache2.*
apt autoremove
whereis apache2
@AnythingLinux
AnythingLinux / ruby.sh
Last active January 10, 2024 17:49
Ruby Uninstall Linux
#!/bin/bash
# This script will do Ruby Uninstall Linux and reboot Linux
sudo apt-get purge ruby
sudo rm -rf /usr/local/lib/ruby
sudo rm -rf /usr/lib/ruby
sudo rm -f /usr/local/bin/ruby
sudo rm -f /usr/bin/ruby
sudo rm -f /usr/local/bin/irb
@AnythingLinux
AnythingLinux / ftp.sh
Created September 1, 2019 11:11
Installing an FTP server (vsftpd) on Ubuntu 18.04
sudo apt update && sudo apt install vsftpd
sudo service vsftpd status
sudo ufw allow OpenSSH
sudo ufw allow 20/tcp
sudo ufw allow 21/tcp
sudo ufw allow 40000:50000/tcp
sudo ufw allow 990/tcp
sudo ufw allow ssh
sudo adduser ftpuser
@AnythingLinux
AnythingLinux / How To Install MongoDB in Ubuntu 22.04 LTS
Last active October 9, 2023 16:20
Install MongoDB in Ubuntu 22.04 LTS
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
sudo apt update
sudo apt install mongodb-org
sudo systemctl enable mongod
sudo systemctl start mongod
sudo systemctl daemon-reload
sudo systemctl restart mongod
sudo systemctl status mongod
mongod --version
@AnythingLinux
AnythingLinux / RTMP.sh
Created August 18, 2019 10:04
Seting up nginx+RTMP module on ubuntu 18.04 ▶️ to push the stream to multiple platforms
FIRST INSTALL THESE USEFUL / REQUIRED PACKAGES
sudo apt-get install wget unzip software-properties-common dpkg-dev git make gcc automake build-essential zlib1g-dev libpcre3 libpcre3-dev libssl-dev libxslt1-dev libxml2-dev libgd-dev libgeoip-dev libgoogle-perftools-dev libperl-dev pkg-config autotools-dev gpac ffmpeg mediainfo mencoder lame libvorbisenc2 libvorbisfile3 libx264-dev libvo-aacenc-dev libmp3lame-dev libopus-dev unzip
ADD THE NGINX REPOSITORY AND UPDATE
sudo add-apt-repository ppa:nginx/stable
apt update
INSTALL NGINX
@AnythingLinux
AnythingLinux / remote.sh
Created July 16, 2019 17:14
Remote Desktop
#!/bin/bash
# Ubuntu (GNOME) 18.04 Enable VNC with no encryption
sudo apt install gconf2 -y
sudo ufw allow from any to any port 5900 proto tcp
gconftool-2 --set --type=bool /desktop/gnome/remote_access/enabled true
gsettings set org.gnome.Vino prompt-enabled false
gsettings set org.gnome.Vino require-encryption false
echo $'\n'$"*** Encryption Disabled ***"
echo $'\n'$"*** Launching Settings ***"
@AnythingLinux
AnythingLinux / microkube.sh
Last active November 28, 2019 13:25
Peatio Microkube Install Linux
#!/bin/bash
COMPOSE_VERSION="1.25.0"
COMPOSE_URL="https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)"
# Microkube bootstrap script
install_core() {
sudo bash <<EOS
apt-get update
apt-get upgrade -y -q
@AnythingLinux
AnythingLinux / contract.sol
Last active June 19, 2019 21:21
smart contract
# pragma solidity ^0.4.9;
pragma solidity >=0.4.21 <0.6.0;
contract SafeMath {
function safeMul(uint a, uint b) internal returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
}
@AnythingLinux
AnythingLinux / yarn.sh
Last active August 12, 2021 23:05
Yarn Install Ubuntu 18.04 LTS
#!/bin/sh
# Install
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo npm install -g yarn
yarn --version
# Uninstall
@AnythingLinux
AnythingLinux / linuxbrew.sh
Last active August 12, 2021 23:05
Linuxbrew (un) install Linux
#!/bin/sh
# Linuxbrew (un)installer
# Install Linuxbrew
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
sudo apt-get install build-essential
echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >>~/.profile
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
brew install gcc