Skip to content

Instantly share code, notes, and snippets.

View mnabila's full-sized avatar
🏡
Working from home

M. Nabil Adani mnabila

🏡
Working from home
View GitHub Profile
@mnabila
mnabila / local_db_setup.py
Last active March 9, 2020 03:16 — forked from macloo/local_db_setup.py
If you have a MySQL database in XAMPP, and you're running a Flask app locally that needs to connect to that database, this works.
#!/Users/username/Documents/python/projectname/env/bin/python
# edit line 1 to match what YOU get when you are in YOUR virtualenv and type: which python
# NO SPACES in first 3 chars in line 1: #!/
# make sure env is activated!
# make sure you have "started all" in XAMPP!
# code below works for a MySQL database in XAMPP on Mac OS
# pymysql can be installed with pip: pip install PyMySQL
import pymysql
@mnabila
mnabila / tmux-cheatsheet.markdown
Created May 16, 2018 02:27 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname