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
# someStruct is a struct with other structs as fields | |
# printf will show all the tree struct on a human friendly format | |
prettyString, _ := json.MarshalIndent(someStruct, "", " ") | |
fmt.Printf("%s: %s\n", reflect.TypeOf(someStruct).Name(), prettyString) |
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
'use strict'; | |
var QRCode = require('qrcode'); | |
var from = 1; | |
var to = 100; | |
/** | |
* Generates 'to' qr png images with the numbers | |
*/ | |
for (var i = from; i <= to; i++) { |
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
#Just base64 encode a binary file: | |
openssl base64 -in file.bin -out file.b64 | |
#Decode the same file | |
openssl base64 -d -in file.b64 -out file.bin | |
#Encrypt a file using triple DES in CBC mode using a prompted password: | |
openssl des3 -salt -in file.txt -out file.des3 | |
#Decrypt a file using a supplied password: |