Skip to content

Instantly share code, notes, and snippets.

Get New Instance
apt-get update -y
apt-get upgrade -y
apt-get install libffi-dev python3-pip python3-dev python3-testresources libssl-dev wkhtmltopdf gcc g++ make -y
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install nodejs redis-server -y
node --version
npm install -g yarn
apt-get install mariadb-server mariadb-client -y
mysql_secure_installation
@asif633
asif633 / Privacy_Policy.md
Created December 17, 2020 18:12
Privacy Policy Piefashion App

Privacy Policy

Asif Iqubal built the Piefashion app as a Free app. This SERVICE is provided by Asif Iqubal at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Piefashion unless otherwise defined in this Privacy Policy.

  1. List keys ls -l ~/.ssh/id_*.pub
  2. Generate key ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_sohoj_rsa -C "pietechlabs2019@gmail.com"
  3. To copy ssh key to server sudo ssh-copy-id -i ~/.ssh/id_sohoj_rsa user@host
  4. Login using sudo ssh -i ~/.ssh/id_sohoj_rsa user@host
  5. Change ssh auth ways sudo nano /etc/ssh/sshd_config
  6. Change those PasswordAuthentication no ChallengeResponseAuthentication no UsePAM no
  7. Restart using sudo systemctl restart ssh
  8. Add new user adduser sammy
  9. Give privileges usermod -aG sudo sammy
  10. Basic firewall setup ufw app list, ufw allow OpenSSH, ufw enable, ufw status
@asif633
asif633 / nginx-node.md
Created August 28, 2019 04:38
Nodejs, nginx server setup

Initial Setup server

  1. ssh root@your_server_ip
  2. adduser username
  3. usermod -aG sudo username
  4. ufw app list
  5. ufw allow OpenSSH
  6. ufw enable
  7. ufw status
  8. ssh username@your_server_ip

DNS to server public IP

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore HelloWorld-release-unsigned.apk alias_name
./zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk // inside build-tools
keytool -keystore formconnect.keystore -list -v // lists keystore properties
@asif633
asif633 / es6.md
Created September 18, 2017 20:08

Points for let and const

let

  1. No variable hoisting, first declare variable then use. In var you can use variable hoisting.
  2. let is scoping at block level.

const

  1. const is used for constant declarations.
  2. For primitive types the value can't change.
  3. For array and objects as the reference is stored in const, the value can change.