Skip to content

Instantly share code, notes, and snippets.

View saterus's full-sized avatar

Alex Burkhart saterus

View GitHub Profile

Strawman Schema

Activation

  • id
  • build_id (Build)
  • created_by_id (User)
  • state (json)
    • finished_at
    • failed_at
  • is_delete?

Encrypt with a password

$ openssl enc -aes-256-cbc -pbkdf2 -iter 10000 -in data.txt -out encrypted.txt
$ echo "data" | openssl enc -aes-256-cbc -pbkdf2 -iter 10000 > encrypted.txt
$ openssl enc -aes-256-cbc -pbkdf2 -iter 10000 -in data.txt -out encrypted.txt -pass file:PASSWORD_FILE

Decrypt with a password

$ openssl enc -d -aes-256-cbc -pbkdf2 -iter 10000 -in encrypted.txt
@saterus
saterus / flow.schema
Created July 22, 2021 16:21
Flow Document JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Catalog",
"description": "Each catalog source defines a portion of a Flow Catalog, by defining collections, derivations, tests, and materializations of the Catalog. Catalog sources may reference and import other sources, in order to collections and other entities that source defines.",
"type": "object",
"properties": {
"$schema": {
"title": "JSON-Schema against which the Catalog is validated.",
"default": null,
"type": [
@saterus
saterus / HTML (EEx).hjson
Last active April 1, 2020 14:32
VSCode Snippets for Elixir & EEx Templates
{
// Place your snippets for HTML (EEx) here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Single line interpolation": {
"prefix": "sl",
"body": [
"<%= $1 %>",
@saterus
saterus / settings.json
Created October 10, 2019 15:35
VSCode Settings
{
"breadcrumbs.enabled": true,
"editor.copyWithSyntaxHighlighting": false,
"editor.cursorBlinking": "phase",
"editor.cursorSmoothCaretAnimation": true,
"editor.detectIndentation": false,
"editor.fontFamily": "Fira Code iScript, Fira Code",
"editor.fontLigatures": true,
"editor.fontSize": 14,
"editor.glyphMargin": true,

Setup Elixir History:

  1. touch ~/.iex_history
  2. Set the ERL_AFLAGS env var: bash: echo "export ERL_AFLAGS='-kernel shell_history enabled'" >> ~/.bashrc zsh: echo "export ERL_AFLAGS='-kernel shell_history enabled'" >> ~/.zshrc fish: set -Ux ERL_AFLAGS '-kernel shell_history enabled'
  3. Add some history:
    $  iex                                                                                                                                                                 (/f/s/2/s/script_drop) 12:09:25
    Erlang/OTP 22 [erts-10.4.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]
    
function giphy
set filename "$argv[1]"
set full_path "$HOME/Downloads/$filename"
if test -n "$argv[2]"
set url "$argv[2]"
else
set url (pbpaste)
end
[
{"location": "Dublin", "datetime": "20171109T220000Z", "temp": 35},
{"location": "Los Angeles", "datetime": "20171111T110000Z", "temp": 59 },
{"location": "Los Angeles", "datetime": "20171111T070000Z", "temp": 59 },
{"location": "Dublin", "datetime": "20171110T000000Z", "temp": 31},
{"location": "Dublin", "datetime": "20171110T100000Z", "temp": 27},
{"location": "Columbus", "datetime": "20171111T030000Z", "temp": 21 },
{"location": "Dublin", "datetime": "20171110T190000Z", "temp": 27},
{"location": "Los Angeles", "datetime": "20171109T220000Z", "temp": 62 },
{"location": "Dublin", "datetime": "20171109T230000Z", "temp": 33},
~ # encrypt a file
~ gpg --armor --symmetric --cipher-algo AES256 -o FILE.enc FILE
~
~ # decrypt a file
~ gpg -o FILE -d FILE.enc

Keybase proof

I hereby claim:

  • I am saterus on github.
  • I am alexburkhart (https://keybase.io/alexburkhart) on keybase.
  • I have a public key ASCERkeVCnpCZh89ht6J9LC6c9WijHqeLeHog67oFHz0JAo

To claim this, I am signing this object: