Skip to content

Instantly share code, notes, and snippets.

View georgelima's full-sized avatar
:shipit:
hey bro, what's up?

George Lima georgelima

:shipit:
hey bro, what's up?
View GitHub Profile
#! /bin/bash
set -e
if [ -z "$1" ]; then
echo "Usage: docker-machine-import.sh MACHINE_NAME.zip"
echo ""
echo "Imports an exported machine from a MACHINE_NAME.zip file"
echo "Note: This script requires you to have the same \$MACHINE_STORAGE_PATH/certs available on all host systems"
exit 0
@georgelima
georgelima / gist.js
Last active September 4, 2020 03:59
Cielo QRCode Parser Rec
const barcode = "00020101021226410005Cielo0116123456789012000102082009130352040000530398654120000000001005802BR5905CIELO6014SANTO ANDRE SP801010033”https://www.cielo.com.br/qrcode”011613050329197F190A0212150518113349030410000404000105020006020163049872"
const ID_SIZE = 2
const LENGTH_SIZE = 2
const TRANSACTION_INFO_LENGTH_SIZE = 3
const MERCHANT_ACCOUNT_INFORMATION_ID = '26'
const TRANSACTION_INFORMATION_ID = '80'
const parseQRCode = (barcode, cursor = 0, items = []) => {