Skip to content

Instantly share code, notes, and snippets.

View harmandeep-singh's full-sized avatar

Harmandeep Singh harmandeep-singh

View GitHub Profile
@harmandeep-singh
harmandeep-singh / GistFile Digital Ocean
Last active July 8, 2019 14:37
Setup php mail Ubuntu digital ocean
//login to your droplet.
//1. output the hostname
hostname
//2. modify the hosts
nano /etc/host
//3. the first line in this file, should use the hostname on the end. For example: "Harman"
127.0.0.1 localhost localhost.domainname Lee
@harmandeep-singh
harmandeep-singh / vbox-guest-ubuntu-server.txt
Last active July 9, 2019 00:14
Install VirtualBox Guest Additions for Ubuntu Server
//1. Create a Dirctory in /media/cdrom
sudo mkdir /media/cdrom
//2. Mount the CD-ROM
sudo mount /dev/cdrom /media/cdrom
//3. Change into the mounted directory
cd /media/cdrom
//4. Install the necessary dependencies
@harmandeep-singh
harmandeep-singh / jQuery.FlexSlider.autoVideoPlayback.js
Created October 21, 2020 10:05
FlexSlider AutoPlay On Video End
$(function() {
$('.flexslider').flexslider({
animation: "slide",
slideshow: false, // Stop Auto Slide Changes
directionNav: false,
start: function() {
updateTimeVideoTimeAction();
}, // Fires when the slider loads the first slide
before: function() {
// Stop all Video if any Playback left
@harmandeep-singh
harmandeep-singh / launch.json
Created August 17, 2022 06:11
Launch.json for node app with jest single test file run prompt (dialogue box)
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Program",
"type": "node",
"request": "launch",
"skipFiles": [
"<node_internals>/**"
],
@harmandeep-singh
harmandeep-singh / install-zsh-windows-git-bash.md
Last active August 25, 2022 17:47
Oh-my-zsh in Windows git bash
@harmandeep-singh
harmandeep-singh / Clean-WSL.txt
Created August 25, 2022 17:46
WSL 2 disk space Cleanup
// Run powershell as admin
Go inside "wsl2" cmd
install ncdu : sudo apt-get install ncdu
run : sudo ncdu --exclude mnt //--exclude mnt Ignore windows drive like - c: d: etc...
wsl --shudown
Optimize-VHD -Path %userprofile%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\ext4.vhdx -Mode Full
Optimize-VHD -Path %userprofile%\AppData\Local\Docker\wsl\data\ext4.vhdx -Mode Full
// Use Windirstat like program to find .vhdx file , generally those are large in size