Skip to content

Instantly share code, notes, and snippets.

View drewblas's full-sized avatar
🏠
Working from home

Drew Blas drewblas

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am drewblas on github.
  • I am drewblas (https://keybase.io/drewblas) on keybase.
  • I have a public key whose fingerprint is 3EDF C403 0683 9E45 F58E 7036 6619 71D9 1784 3713

To claim this, I am signing this object:

@drewblas
drewblas / encryption_mistake_example.rb
Last active August 29, 2015 14:05
Encryption Mistake Example
require 'openssl'
=begin
Most plaintext must be fed as a string or a binary object to be encrypted.
However, it's often possible to mis-decode the plaintext before encrypting it.
i.e. If it's received as a string in JSON, you often don't know if the string
is an encoded representation (e.g. plain, hex encoded, base64 encoded, etc)
@drewblas
drewblas / validating.md
Last active March 30, 2016 14:30 — forked from gamache/validating.md
Validating Data in Elixir with ExJsonSchema

priv/schema.json

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Events API Schema",

  "definitions": {

    "event_collection": {