Skip to content

Instantly share code, notes, and snippets.

@nanusdad
nanusdad / increasing-partition-size-ubuntu.md
Last active May 18, 2023 02:44
Increasing size of partition in Ubuntu 20.04

Increasing size of partition in Ubuntu 20.04

df -h
vgdisplay
lvdisplay
lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
lvdisplay
df -h
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
df -h
@nanusdad
nanusdad / drupal.conf
Last active March 30, 2023 11:50
Installing Drupal 10 on Ubuntu 20.04
server {
listen 80;
root /var/www/html/drupal;
index index.php index.html index.htm;
server_name _;
location / {
@nanusdad
nanusdad / setup-nodejs-app-nginx-mongodb.md
Last active January 19, 2023 05:47
Setting up NodeJS app with NGINX and MongoDB on Ubuntu 20.04

Setting up NodeJS app with NGINX and MongoDB on Ubuntu 20.04

  1. Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
nvm install --lts
  1. Install nginx
@nanusdad
nanusdad / mariadb-cheatsheet.md
Created December 20, 2022 11:31
MariaDB cheatsheet

MariaDB (MySQL) cheatsheet

Create database and add user with access

# Create db
CREATE DATABASE 'testDB';

# Create user on localhost
CREATE USER 'user1'@localhost IDENTIFIED BY 'password1';
# for all hosts
CREATE USER 'user1'@'%' IDENTIFIED BY 'password1';
@nanusdad
nanusdad / getting-started-with-Meteor-on-Alpine-Linux.md
Last active October 12, 2022 11:59
Getting started with Meteor on Alpine Linux
  1. Install Alpine Linux Virtual ISO
wget https://dl-cdn.alpinelinux.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.2-x86_64.iso
# Get the version you need at https://alpinelinux.org/downloads/
  1. Make sure the environment variable for the proxy server is set correctly
export HTTP_PROXY=http://user:pass@http://proxy_server:proxy_port
@nanusdad
nanusdad / getting-started-with-Meteor-on-Ubuntu.md
Last active October 10, 2022 07:26
Getting started with Meteor Ubuntu
  1. Create appuser group
  2. Create appuser
  3. Login as appuser
su - appuser
  1. Install nvm
5. Install Meteor
@nanusdad
nanusdad / ssl-cert-on-ubuntu-lightsail-for-Moodle.md
Last active September 25, 2023 06:07
Setting up LetsEncrypt SSL certificate for Moodle on Ubuntu

Setting up LetsEncrypt SSL certificate for Moodle on Ubuntu

  1. Install certbot

sudo apt install certbot python3-certbot-apache
  1. Enable firewall to allow Apache https and ssh

sudo ufw status
sudo ufw enable
@nanusdad
nanusdad / linux-package-installation-and-management.md
Created January 25, 2022 08:10
Linux (Ubuntu / Debian) package installation and management

Linux (Ubuntu / Debian) package installation and management

List packages

apt list --installed
dpkg -l

Remove package

sudo apt-get remove 
@nanusdad
nanusdad / gitlab-backup-and-restore.md
Last active July 22, 2023 06:03
Gitlab backup and restore notes

Gitlab backup and restore notes

Backup (on old server)

sudo gitlab-backup create
#backup is available in
cd /var/opt/gitlab/backups
cp 1643*.tar /tmp
cd /tmp
gzip 1643*.tar