In iTerm2, in the menu bar go to Scripts > Manage > New Python Script
Select Basic. Select Long-Running Daemon
Give the script a decent name (I chose auto_dark_mode.py)
Save and open the script in your editor of choice.
| // pkcs7strip remove pkcs7 padding | |
| func pkcs7strip(data []byte, blockSize int) ([]byte, error) { | |
| length := len(data) | |
| if length == 0 { | |
| return nil, errors.New("pkcs7: Data is empty") | |
| } | |
| if length%blockSize != 0 { | |
| return nil, errors.New("pkcs7: Data is not block-aligned") | |
| } | |
| padLen := int(data[length-1]) |
| // Node v6.9.0 | |
| // | |
| // TEST FILE (cut down for simplicity) | |
| // To ensure Golang encrypted string can be decrypted in NodeJS. | |
| // | |
| let crypto; | |
| try { | |
| crypto = require('crypto'); |