Skip to content

Instantly share code, notes, and snippets.

@jackgu1988
jackgu1988 / sonic-pi-tutorial.md
Created September 9, 2018 13:09 — forked from jwinder/sonic-pi-tutorial.md
Sonic Pi in-app tutorials concatenated - last synced 2018-07-17 - https://sonic-pi.net/tutorial - https://github.com/samaaron/sonic-pi

1 Welcome to Sonic Pi

Welcome friend :-)

Welcome to Sonic Pi. Hopefully you're as excited to get started making crazy sounds as I am to show you. It's going to be a really fun ride where you'll learn all about music, synthesis, programming, composition, performance and more.

@jackgu1988
jackgu1988 / checkmail.py
Created March 15, 2018 15:19 — forked from jonathanhculver/checkmail.py
Python script to check gmail for new email every minute and send to Arduino over serial.
import imaplib, serial, struct, time
class Mail():
def __init__(self):
self.user= 'USER'
self.password= 'PASS'
self.ser = serial.Serial('/dev/tty.usbmodem621', 9600)
self.M = imaplib.IMAP4_SSL('imap.gmail.com', '993')
self.M.login(self.user, self.password)
@jackgu1988
jackgu1988 / key_generation.py
Created February 19, 2017 15:48 — forked from mbenedettini/key_generation.py
Python implementation of Mifare AES-128 simmetric key diversification, as described in document AN10922
from Crypto.Cipher import AES
from bitstring import BitArray, Bits
(key, m) = (BitArray(hex='00112233445566778899AABBCCDDEEFF'), BitArray(hex='00000000000000000000000000000000'))
const_rb = BitArray(hex='00000000000000000000000000000087')
k0 = BitArray(hex=AES.new(key.bytes).encrypt(m.bytes).encode('hex'))