Skip to content

Instantly share code, notes, and snippets.

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

Frank Owusu Boakye oboynitro

🏠
Working from home
View GitHub Profile
@oboynitro
oboynitro / FlaskOnSharedHosting.md
Created January 31, 2022 05:51 — forked from drengle/FlaskOnSharedHosting.md
How to Create Python Flask Website with Shared Hosting and No Root/Sudo Access.

Intro

I'm writing this walkthrough (here and a few other places) to hopfully make it much easier for anyone to impliment their Python Flask websites in a shared hosting environment.

I know many colleges and courses use Python and Flask to create websites, but it may be difficulat to understand how to translate that website from the classroom to a real hosting environment. I know for me personally it tookmany hours pouring through internet searches before I finally figured out how to get this working.

If you feel like you generally know what you're doing and don't need the basics explained to you then you can skip ahead to step 3.

1. Your Host Must Support Python Development

1. Install oh-my-zsh
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
2. Clone necessary plugins.
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
3. Add plugins to ~/.zshrc as
plugins = ( [plugins...] zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting)
@oboynitro
oboynitro / shell.md
Created July 11, 2021 13:21 — forked from achmiral/shell.md
MySQL / MariaDB login without SUDO
$ > sudo mysql -uroot
mysql > SELECT User, Host FROM mysql.user;
mysql > DROP USER 'root'@'localhost';