Skip to content

Instantly share code, notes, and snippets.

@inspiretk
inspiretk / git auto deploy from local machine to remote server
Last active August 4, 2023 22:29
git auto deploy from local machine to remote server
References: https://gist.github.com/noelboss/3fe13927025b89757f8fb12e9066f2fa
More info: https://www.digitalocean.com/community/tutorials/how-to-use-git-hooks-to-automate-development-and-deployment-tasks
https://www.youtube.com/watch?v=6mYtJu0E47U
[misc commands deluser newuser]
The following steps is for Developers to push their code from their local machine, to their server with git, and let git auto
pull the update to your remote folder. How it works:
- From your local machine, you do your normal coding. When done, you push your new code to git
- Git then updates your local machine, and push it to your server's git
- Git on your server gets the new update, and push it to your server's working folder
https://www.odoo.com/documentation/11.0/setup/install.html#setup-install-source
# Python 3.5+
#ubuntu 18.04 install Python 3.5
apt-get install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.5 -y
sudo update-alternatives --config python
#setup your default python version eg sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1
#setup your default python version eg sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
@inspiretk
inspiretk / Wordpress server setup Ubuntu 18.04 Nginx
Last active May 29, 2022 11:39
Wordpress Ubuntu 18.04 Nginx
install PHPMyAdmin on Nginx Ubuntu 18.04
https://youtu.be/pGc8DbJVupE How to Install Nginx, PHP, MySQL (LEMP) on Ubuntu 18.04
sudo apt update && sudo apt install nginx -y
sudo service nginx status
sudo ufw allow OpenSSH
sudo ufw allow 'Nginx HTTP'
sudo ufw enable
sudo ufw status
check ngix is working, go load your website up, has default ngix page
sudo apt update && sudo apt install mysql-server -y

Install Robo3t On Ubuntu 18.04

Download the package form Robo3t or using wget
wget https://download.studio3t.com/robomongo/linux/robo3t-1.4.4-linux-x86_64-e6ac9ec.tar.gz
Extract here using

tar -xvzf robo3t-1.4.4-linux-x86_64-e6ac9ec.tar.gz

@inspiretk
inspiretk / cloudSettings
Last active March 6, 2022 00:07
visual studio code settings
{"lastUpload":"2022-03-06T00:08:15.730Z","extensionVersion":"v3.4.3"}
https://github.com/Yenthe666/auto_backup
backup to server first
sudo pip3 install pysftp
# this is no good, it needs List_db to be True, but it's disabled for security purpose. Need another method.
https://github.com/meganz/MEGAcmd/blob/master/contrib/docs/BACKUPS.md
push local backup to mega cloud
https://github.com/meganz/MEGAcmd/blob/master/UserGuide.md
sudo apt update && sudo apt upgrade -y
sudo apt install git python3-pip build-essential wget python3-dev python3-venv python3-wheel libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less -y
wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo apt install ./wkhtmltox_0.12.1.3-1~bionic_amd64.deb -y
# source go to https://github.com/Yenthe666/InstallScript
sudo wget https://raw.githubusercontent.com/Yenthe666/InstallScript/12.0/odoo_install.sh
nano odoo_install.sh
# Line OE_USER="odoo" is your odoo folder name leave as it is
# Line OE_SUPERADMIN="admin" is the master password for this Odoo installation (admin). Change admin to your new strong password
@inspiretk
inspiretk / Script SSL 4 of 4
Last active October 19, 2019 01:01
WORKING VPS Install Odoo Multi Domain Non WWW SSL Security
#!/bin/bash
# This script is to install lets encrypt SSL to your domain
# nano letsencryptssl.sh
# Copy everything in this script and paste it in, save file and exit
# chmod +x letsencryptssl.sh
# ./letsencryptssl.sh
# (when script is running, press enter to continue, put your important email for ssl renewal notices, 2 for redirect to non www)
DOMAIN1=thuani.com
ODOOCFOLDER=/etc
Youtube video here of the below instructions: https://youtu.be/WmN2Yc-75lE
############# START of File #############
# Docker setup for Windows 7 64 bit. Need Docker Toolbox because Docker Windows uses Hyper V, and windows 7 dont have it.
# Docker Toolbox will install VirtualBox and you'll run docker containers inside your VirtualBox.
# You can bind your local machine Windows 7 folder to link it to your container inside your VirtualBox machine.
# Your windows 7 machine needs to be 64 bit, with virtualization. Full instructions here: https://docs.docker.com/toolbox/toolbox_install_windows/
### Instructions ###
# 1. Install Docker Toolbox > Search for docker toolbox download and download it
# OR Download latest .exe file using this link https://github.com/docker/toolbox/releases
#!/bin/sh
# nano setupodoo.sh
# > copy the setupodoo script in details and save it as setupodoo
# chmod +x setupodoo.sh
# ./setupodoo.sh
# STEP 1
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install python3-pip
# INSTALL DEPENDENCIES USING PIP3