Skip to content

Instantly share code, notes, and snippets.

View MrEliasen's full-sized avatar

Mark Eliasen MrEliasen

View GitHub Profile

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@MrEliasen
MrEliasen / crypto-helper.ts
Last active July 29, 2023 08:44
Symmetric Encryption using window.crypto.subtle API
// Read more about the API here:
// https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto
export type EncryptedPayload = { ciphertext: string, iv: string };
const algorithm: string = "AES-GCM";
const keyLength: number = 256;
const extractable: boolean = true;
const keyUsages: KeyUsage[] = ["encrypt", "decrypt"];
### Keybase proof
I hereby claim:
* I am mreliasen on github.
* I am markeliasen (https://keybase.io/markeliasen) on keybase.
* I have a public key ASBNmPdAkBg-I7Nc587K5vXezE5QBc8G-MONiEXBlP3rjQo
To claim this, I am signing this object:
@MrEliasen
MrEliasen / generator.js
Last active August 14, 2018 23:58
A random level generator in JS
class Generator {
constructor(options) {
this.options = {
canvasId: options.canvasId,
canvasWidth: options.canvasWidth | 800,
canvasHeight: options.canvasHeight | 600,
cellHeight: options.cellHeight | 32,
cellWidth: options.cellWidth | 32
};
#!/bin/bash
# Utility
alias lsa="ls -lA"
alias cd..="cd .."
alias o-hosts="sudo vim /etc/hosts"
# Git
alias ga="git add ."
alias gpush="git push origin master"