Skip to content

Instantly share code, notes, and snippets.

View ffmpeg-cheat-sheet.md

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 / expanding-root-vol-on-ec2-ubuntu.md
Last active Nov 16, 2020
Expanding Root Volume on EC2 (Ubuntu)
View expanding-root-vol-on-ec2-ubuntu.md

Expanding Root Volume on EC2 (Ubuntu)

df -hT
lsblk
sudo growpart /dev/nvme0n1 1
  • For ext4
sudo resize2fs /dev/nvme0n1p1
@nanusdad
nanusdad / InstallingMoodleonAWSLightSail.md
Last active Dec 1, 2020
Installing Moodle on AWS LightSail
View InstallingMoodleonAWSLightSail.md

Installing Moodle on AWS LightSail

Start with a new LightSail Instance running Ubuntu 20.04

  • Update
sudo apt update
  • Install Apache
sudo apt-get install apache2
@nanusdad
nanusdad / learning-locker-api-auth-jwt-password-error.md
Created Aug 25, 2020
Error message in Chrome developer console when logging into LearningLocker
View learning-locker-api-auth-jwt-password-error.md

LRS error

Error message in Chrome developer console when logging into LearningLocker

Unable to connect to "/api/auth/jwt/password”

  • Check mongo as root
sudo su -
service mongod status
@nanusdad
nanusdad / white_screen_on_android.md
Created Sep 27, 2019
White Screen after splash on Android builds
View white_screen_on_android.md

To troubleshoot

ionic cordova run browser --prod --release

Updates required to config.xml file

<preference name="SplashScreen" value="assets/images/logo.svg" />
<preference name="SplashScreenBackgroundColor" value="#000" />
@nanusdad
nanusdad / omero-cheat-sheet.md
Last active Apr 17, 2019
OMERO cheat sheet
View omero-cheat-sheet.md

Update root password

omero db password
Please enter password for OMERO root user: 
Please re-enter password for OMERO root user: 
UPDATE password SET hash = 'ibTzrADXfsKFfNwBdQsa+g==' WHERE experimenter_id  = 0;

Check password hash

psql -h localhost omdbprim -U omdbusr1 -c " select * from password"
@nanusdad
nanusdad / certbot-initial-and-expand-domains.md
Last active Aug 27, 2020
Using certbot to add and expand domains to cert
View certbot-initial-and-expand-domains.md

To use Lets Encrypt certbot command to install certificate to work with AWS Lightsail Wordpress instance

sudo certbot certonly --webroot -w /opt/bitnami/apps/wordpress/htdocs/ \
-d domain1.org

To add new domains to certificate

sudo certbot certonly --webroot -w /opt/bitnami/apps/wordpress/htdocs/ \
--expand -d domain1.org,www.domain1.org,domain2.edu,domain3.org
@nanusdad
nanusdad / vi_related.md
Last active Apr 19, 2018
VI related tips
View vi_related.md
@nanusdad
nanusdad / npm_related.md
Last active Apr 19, 2018
npm related issues / fixes
View npm_related.md
@nanusdad
nanusdad / .gitignore
Created Apr 18, 2018 — forked from smebberson/.gitignore
Express simple authentication example
View .gitignore
node_modules
*.swp