December 10
Install Flask on Ubuntu 18.04
Check your Python version:
$ python -V
$ python3 -V
Run your Flask app with python 3. You can set your defaul python with python3 if that is what you want with a simple HACK: $ sudo ln -s /usr/bin/python3 /usr/bin/python
Best to run your app in venv, install python venv if not in your system:
sudo apt install python3.x-venv
Create your project folder and create new virutal...
November 2
React.js tutorial
You should always use latest stable version of node and npm
# npx is a package runner tool that comes with npm5.2+.
npx create-react-app my-app
cd my-app
npm start
Tip: install React Developer Tools for chrome. It is a helpful tool for debugging during development.
...
October 7
Docker commands
Common used docker commands:
List of running containers
$ docker ps
$ docker ps -a // show all containers running & stopped
List of docker images
$ docker images
$ docker image ls
Starts a new container to run image. $ docker run = docker pull + docker start
$ docker run {image-name}
$ docker run -d {image-name} // with detach mode
// port binding with host and container
$...
October 3
How To Secure Apache with Let's Encrypt on Ubuntu 20.04
Allow both ports
$ sudo ufw allow 80
$ sudo ufw allow 443
Step 1 – Installing the "Let's Encrypt" package:
$ sudo apt install letsencrypt
Install timer for renewal:
$ sudo systemctl status certbot.timer
Step 2 – Standalone server for getting the "Let's Encrypt" SSL certificate:
$ sudo certbot certonly --standalone --agree-tos --preferred-challenges http -d domain-name.com
Step 3 – Automatic installation of the SSL certificate on nginx and...
September 26
EC2 instance checking ENA enable status
Check your ENA enable/statues
aws ec2 describe-instances --instance-ids instance_id --query "Reservations[].Instances[].EnaSupport"
Enable your linux (ubuntu) instance for ENA support
aws ec2 modify-instance-attribute --instance-id instance_id --ena-support
...
July 8
Manage expo account locally
check your current local expo account:
$ expo w
log out your current expo account locally:
$ expo logout
log in:
$ expo login
...
June 21
Configure Apache to Support SSL
Creating the SSL Certificate
sudo a2enmod ssl
sudo service apache2 restart
Generate a Self-signed Certificate
sudo openssl genrsa -out ca.key 2048
sudo openssl req -nodes -new -key ca.key -out ca.csr
Lastly, generate a self-signed certificate (ca.crt) of X509 type valid for 365 keys.
sudo openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt
Create a directory to place the certificate files we have created.
sudo mkdir /etc/apache2/ssl
sudo...
June 16
Install Oracle Java on Ubuntu by source
1. download java-{your-version}.tar.gz from oracle.com
2. run
sudo tar xvf jdk-{your-version}.tar.gz --directory /usr/lib/jvm/
3. check verson
/usr/lib/jvm/jdk{your-version}/bin/java -version
/usr/lib/jvm/jdk{your-version}/bin/javac -version
4. if versions are working for you,
sudo vim /etc/profile
5. add following to the file. Log out and log in again
JAVA_HOME=/usr/lib/jvm/jdk1.7.0_80
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH
...