Skip to content

Instantly share code, notes, and snippets.

View melakhvision's full-sized avatar

Codekhalipha melakhvision

View GitHub Profile
First Do this ...
git fetch origin master
git merge master
Then, do this ...
git fetch origin master:tmp
git rebase tmp
git push origin HEAD:master
@melakhvision
melakhvision / uninstall_python3.MD
Created October 27, 2022 19:33 — forked from zhensongren/uninstall_python3.MD
How to uninstall python3 from Ubuntu

To list all python versions in default locations

ls /usr/bin/python*

To remove just python3 package

sudo apt-get remove python3.5

plus it's dependent packages

sudo apt-get remove --auto-remove python3.5

plus configuration and/or data files of python3

sudo apt-get purge python3.5

@melakhvision
melakhvision / nextcloud-docker-backup.sh
Created October 22, 2022 17:59 — forked from computercam/nextcloud-docker-backup.sh
docker nextcloud backup / restore
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
TIMESTAMP=`date +"%Y-%m-%d-%T"`
BACKUP_DIR="${DIR}/${TIMESTAMP}"
APPDATA_DIR="${DIR}/../appdata"
MYSQL_USER="root"
MYSQL_PASSWORD="abc123"
MYSQL_DB="nextcloud_db"
@melakhvision
melakhvision / bash.sh
Created September 23, 2022 01:28 — forked from devisaah/bash.sh
FATAL: Listen error: unable to monitor directories for changes.
FATAL: Listen error: unable to monitor directories for changes.
Visit https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers for info on how to fix this.
Solved:
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]
@melakhvision
melakhvision / asterisk.sh
Created September 15, 2022 15:45 — forked from kolosek/asterisk.sh
Install Asterisk 16 LTS on Ubuntu 18.04 / 16.04 & Debian 10/9
#Update system & reboot
sudo apt update && sudo apt -y upgrade
sudo reboot
#Install Asterisk 16 LTS dependencies
sudo apt -y install git curl wget libnewt-dev libssl-dev libncurses5-dev subversion libsqlite3-dev build-essential libjansson-dev libxml2-dev uuid-dev
#Add universe repository and install subversio
sudo add-apt-repository universe
sudo apt update && sudo apt -y install subversion
@melakhvision
melakhvision / LEMP-Stack-Installation-Guide.md
Created September 13, 2022 15:15 — forked from mosufy/LEMP-Stack-Installation-Guide.md
LEMP Stack Installation Guide. Linux (Ubuntu), Nginx, MySQL, PHP

LEMP Stack Installation Guide

LEMP is the new LAMP. If you were an Apache user like most of us, simply follow this guide to easily deploy and learn develop to develop on Nginx.

Pre-requisites

Be sure that you are already running Linux be it Ubuntu, CentOS or RHEL. However, this guide will demonstrate installation guide for Ubuntu Server 14.04 LTS.

Step 1. Install Nginx

@melakhvision
melakhvision / vaultwarden
Last active September 6, 2022 15:50 — forked from dnno/docker-compose.yaml
Docker-compose setup for Vaultwarden
version: '3'
services:
bitwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: always
environment:
- WEBSOCKET_ENABLED=true
- SIGNUPS_ALLOWED=false

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user