Skip to content

Instantly share code, notes, and snippets.

View djnorrisdev's full-sized avatar

2dz160c1-3c4bz-105t0imj41cu58 djnorrisdev

View GitHub Profile
@djnorrisdev
djnorrisdev / aws_jwt.txt
Created February 8, 2023 14:28
Create jwt keys for aws
Create a key pair and b64 encode them:
```
ssh-keygen -t rsa -b 4096 -m PEM -f ./jwtcookie.key
rsa_priv_key=$(openssl base64 -in jwtcookie.key -A)
rsa_pub_key=$(openssl base64 -in jwtcookie.key.pub -A)
```
Put the base-64 encoded keys into a json file like so:
```
@djnorrisdev
djnorrisdev / jwtRS256.sh
Created February 8, 2023 13:55 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@djnorrisdev
djnorrisdev / theme.liquid
Created February 1, 2021 01:05
Shopify theme course theme.liquid to get things working after scss removal. Video name: "Transfer our static layout to theme".
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="theme-color" content="{{ settings.color_button }}">
<link rel="preconnect" href="https://cdn.shopify.com" crossorigin>
<link rel="preconnect" href="https://fonts.shopifycdn.com" crossorigin>
@djnorrisdev
djnorrisdev / README.md
Last active August 31, 2020 10:32 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Events

// jQuery
$(document).ready(function() {
  // code
})

// Vanilla
document.addEventListener('DOMContentLoaded', function() {
@djnorrisdev
djnorrisdev / css-gooey-menu-version-4.markdown
Created September 3, 2019 21:39
CSS Gooey Menu (Version 4)
@djnorrisdev
djnorrisdev / screenshot.js
Created August 15, 2019 10:37
Snapshot Function w/ image write to firebase
snap = () => {
console.log(this.props.vidRef);
const { clientHeight, clientWidth } = this.props
const ctx = this.canvas.current.getContext('2d')
ctx.drawImage(this.props.vidRef.ref, 0, 0, 640, 480)
ctx.font = '20px Arial'
ctx.fillText(
`${this.props.vidRef.currentTime}s / ${this.player.current.duration}s`,
5,
20
@djnorrisdev
djnorrisdev / canvas.signature.js
Created August 8, 2019 09:07 — forked from peshoicov/canvas.signature.js
Canvas signature, both desktop and mobile
// Setup canvas ..
var canvas = document.getElementById('main-canvas'),
ctx = canvas.getContext('2d');
// setup lines styles ..
ctx.strokeStyle = "#DDD";
ctx.lineWidth = 2;
// some variables we'll need ..
var drawing = false;