Skip to content

Instantly share code, notes, and snippets.

@nanusdad
nanusdad / ffmpeg-cheat-sheet.md
Created May 20, 2021 04:25
FFMPEG cheat sheet

FFMPEG Cheat sheet

Compress MP4 files

ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4

Compressed file to better compatibility (WhatsApp)

ffmpeg -i broken.mp4 -c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p working.mp4

Convert MOV to MP4

@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 / 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
@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 / adding-more-than-2TB-disk-to-Windows.md
Last active May 20, 2023 05:37
Adding more than 2TB disk to Windows

Adding more than 2TB disk to Windows

Maximum capacity of MBR partition tables is only about 2 terabytes. One can use a drive that's larger than 2 terabytes with MBR, but only the first 2 terabytes of the drive will be used. The rest of the storage on the drive will be wasted.

GPT partition tables offer a maximum capacity of 9.7 zetabytes.

If a new large disk has been added - Use Disk Management or diskpart to initialize disk with GPT and then create a volume.

If disk already has MBR partition tables then follow tests below -

@nanusdad
nanusdad / adding-new-disk-ubuntu-20.04.md
Last active May 18, 2023 03:58
Adding additional disk in Ubuntu 20.04

Adding additional disk in Ubuntu 20.04

Check if disk is physically / virtually added to the system

lshw -C disk

Look for the logical name

e.g.

  *-disk:1
 description: SCSI Disk
@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 / alfresco-acs-deployment-community.md
Last active May 17, 2023 10:50
Alfresco ACS deployment (Community) with docker-compose

Alfresco ACS deployment (Community) with docker-compose

Getting started

git clone https://github.com/Alfresco/acs-deployment
cd acs-deployment/docker-compose
cp docker-compose.yml docker-compose.yml-orig # save original
cp community-docker-compose.yml docker-compose.yml
docker compose up 
# OR
@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