Skip to content

Instantly share code, notes, and snippets.

View iamrobins's full-sized avatar
>_

Alex iamrobins

>_
  • Thailand
View GitHub Profile
@markito
markito / hashSHASalt.py
Created July 28, 2017 03:18
Hashing using SHA256/Salt in Python
import uuid
import hashlib
def hashText(text):
"""
Basic hashing function for a text using random unique salt.
"""
salt = uuid.uuid4().hex
return hashlib.sha256(salt.encode() + text.encode()).hexdigest() + ':' + salt
@john2x
john2x / 00_destructuring.md
Last active April 23, 2024 13:18
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences