Skip to content

Instantly share code, notes, and snippets.

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@esmevane
esmevane / disco_v5_plus_Win_Install.md
Created January 24, 2023 23:56 — forked from MSFTserver/disco_v5_plus_Win_Install.md
guide to installing disco v5+ locally on windows

Install Disco Diffusion v5 for Windows

NOTE: Pytorch3d no longer has to be compiled i have stripped out the function we use to make this a lot easier and also so we do not have to use WSL2 with linux and can now run directly on your windows system.

Comments section is not checked often for issues please join the disco diffusion discord for assistance

https://discord.gg/mK4AneuycS

You may now use the official disco diffusion notebook with this tutorial as it has been uodated to reflect the changes here for better cross platform support

@esmevane
esmevane / create-user.spec.tsx
Last active October 14, 2021 16:11
[ Typescript / React / Testing Library ]: Going through the create user kata
import { render } from '@testing-library/react';
import userEvents from '@testing-library/user-event';
import { useState } from 'react';
function usePassword() {
const [password, setPassword] = useState('');
const [show, setShow] = useState(false);
const toggle = () => setShow((previousShowValue) => !previousShowValue);
const update = (event: React.ChangeEvent<HTMLInputElement>) =>
@esmevane
esmevane / paths.ts
Last active September 13, 2021 20:31
[ Typescript ]: Strongly typed, filterable keypaths
type GetKeypaths<
GivenType,
Filter extends string = '___!!!PLACEHOLDER!!!___'
> = GivenType extends object
? keyof GivenType extends string
? keyof GivenType extends Filter
? GetKeypaths<GivenType[keyof GivenType], Filter>
:
| keyof GivenType
| `${keyof GivenType}.${GetKeypaths<
App
Checking Credentials
Identity Present -> Home Page
Identity Absent -> Registration
Registration
Check for Identity Info
Identity Info Present -> Registration Credentials Form
Identity Info Absent -> Identity Info Form
Identity Info Form
Input Identity Info -> Validating Identity Info
@esmevane
esmevane / toggle.spec.tsx
Created July 28, 2021 16:07
[ React / Typescript ]: Example of an architectural journey with a React Toggle component
/* eslint-disable @typescript-eslint/require-await */
import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { createContext, useContext, useReducer } from 'react';
type Events = { type: 'toggle' } | { type: 'reset' };
interface EventMap {
toggle: () => void;
reset: () => void;
}
@esmevane
esmevane / machine.js
Created January 30, 2021 15:25
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@esmevane
esmevane / SketchSystems.spec
Created January 30, 2021 05:19
Touchpoint Dashboard
Touchpoint Dashboard
Loading
Success -> Authenticating
Failure -> Unable to Load
Unable to Load
Retry -> Loading
Authenticating
Checking Credentials
No Credentials -> Login
Credentials Exist -> Verify Credentials
@esmevane
esmevane / SketchSystems.spec
Last active October 11, 2020 18:39
Touchpoint Dashboard
Touchpoint Dashboard
Loading*
Success -> Authenticating
Failure -> Unable to Load
Unable to Load
Retry -> Loading
Authenticating
Checking Credentials?
No Credentials -> Login
Credentials Exist -> Authenticate
Widget&
Async
Pending
Fetch -> Fetching
Fetching
Resolved -> Success
Rejected -> Failure
Success
Fetch -> Fetching
Failure