Skip to content

Instantly share code, notes, and snippets.

View andreferi3's full-sized avatar
🏠
Working from home

Andre Feri Saputra andreferi3

🏠
Working from home
  • Indonesia
View GitHub Profile
@andreferi3
andreferi3 / upload.js
Created July 30, 2020 04:00 — forked from virolea/upload.js
Tracking file upload progress using axios
upload(files) {
const config = {
onUploadProgress: function(progressEvent) {
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
console.log(percentCompleted)
}
}
let data = new FormData()
data.append('file', files[0])
@andreferi3
andreferi3 / encrypt_openssl.md
Created June 27, 2020 07:49 — forked from dreikanter/encrypt_openssl.md
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt: