This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Temporary Encryption Demo | |
// 1. generate an encryption key | |
const algorithm = "AES-GCM"; | |
const iv = window.crypto.getRandomValues(new Uint8Array(12)); | |
crypto.subtle.generateKey( | |
{ | |
name: algorithm, | |
length: 256, | |
}, true, ['encrypt', 'decrypt']).then(key => { | |
console.log('key', key); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Required PRs | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, edited] | |
jobs: | |
check-linked-prs: | |
runs-on: ubuntu-latest | |
steps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from datetime import datetime | |
import csv | |
GITHUB_TOKEN = "" | |
ORG = "" | |
REPO = "" | |
MAX_PAGES = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { configureToMatchImageSnapshot } from 'jest-image-snapshot'; | |
import { close, start } from 'jsdom-screenshot-playwright'; | |
import { afterAll, beforeAll, expect } from 'vitest'; | |
import { render } from '@testing-library/react'; | |
// Update this to match the path to your preview file | |
import * as previewAnnotations from '.storybook/preview'; | |
// Customise jest-image-snapshot options | |
const toMatchImageSnapshot = configureToMatchImageSnapshot({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import csv | |
input_file = "threat-model_threat-dragon.json" | |
output_file = "threat_model.csv" | |
with open(input_file, "r") as f: | |
data = json.load(f) | |
with open(output_file, "w", newline="") as csvfile: |
OlderNewer