This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
clear | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt autoremove -y | |
sudo apt autoclean -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default jsonData => { | |
const dataStr = JSON.stringify(jsonData); | |
const dataUri = `data:application/json;charset=utf-8, ${encodeURIComponent( | |
dataStr | |
)}`; | |
const exportFileDefaultName = 'data.json'; | |
// eslint-disable-next-line no-undef | |
const linkElement = document.createElement('a'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bytesToSize = bytes => { | |
var sizes = ["Bytes", "KB", "MB", "GB", "TB"]; | |
if (bytes == 0) return "0 Byte"; | |
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); | |
return Math.round(bytes / Math.pow(1024, i), 2) + " " + sizes[i]; | |
} |