Skip to content

Instantly share code, notes, and snippets.

cryptomachine = Fernet(key)
with open(inputfile, 'r') as file:
while True:
token = file.read(blocksize)
if not token: break
encToken = cryptomachine.encrypt(token)
if args.verbose:
print encToken
if twitter_flag:
@gonzalo
gonzalo / gpio.sh
Last active October 9, 2020 19:27
Bash functions to use GPIO with C.H.I.P. computer
#!/bin/bash
#FIXME Add usage() function to improve documentation
#Usage:
#Download and run $source gpio.sh
#functions will be available directly from command line -> "$gpio_enable 0" or " gpio_mode 0 out"
#get base label depending on kernel version
#catch it when calling function with: echo "$(gpio_base)"
gpio_base()