Snippets Collections
function deepCopy(obj){
    let toString = Object.prototype.toString;
    if(typeof obj !== 'object') return obj;
    if(obj === null) return null;
    if(Array.isArray(obj)) return obj.map(deepCopy);
    let newObj = {};
    for(let key in obj){
        if(toString.call(obj[key])==='[object Date]'){
            newObj[key] = new Date(obj[key])
        } else if(toString.call(obj[key])==='[object RegExp]'){
            newObj[key] = new RegExp(obj[key])
        }else{
            newObj[key] = deepCopy(obj[key]);
        }
    }
    return newObj;
}
#To Download File From Remote Server To Local Machine Using SCP.using Powershell or gitbash 
scp -i .\keys.pem ubuntu@XX.XX.XX.XX:/home/ubuntu/Dir/fileName  C:\Users\USER\Downloads\
# Do not forget the trailing dash in the source and target destinaton paths!

# Synchronize current directory to server
rsync -avPh --stats --delete ./ HOST:REMOTE_PATH/
  
# Synchronize a local directory to server
rsync -avPh --stats --delete LOCAL_PATH/ HOST:REMOTE_PATH/
  
# Sync remote server with local path
rsync -avPh --stats --delete HOST:REMOTE_PATH LOCAL_PATH

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension