Skip to content

Instantly share code, notes, and snippets.

View rojasmi1's full-sized avatar

Michael Rojas rojasmi1

View GitHub Profile
@JohnAlbin
JohnAlbin / config.js
Last active May 6, 2022 16:43
Storybook navigation sorting
// .storybook/config.js
import { addParameters, configure } from '@storybook/react';
import { storySort } from 'storybook-sort';
addParameters({
options: {
showRoots: true,
storySort: storySort({ order: ['Home', 'Pages', ['Projects', 'Community', 'Help'], 'Components']}),
},
@jchandra74
jchandra74 / openssl.MD
Last active February 16, 2024 21:23
HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

Overview

My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.

Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:

Self-Signed SSL Issue in Chrome

@brianlmoon
brianlmoon / apache_cors_example
Last active November 19, 2023 03:14
CORS example for Apache with multiple domains
# Sets CORS headers for request from example1.com and example2.com pages
# for both SSL and non-SSL
SetEnvIf Origin "^https?://[^/]*(example1|example2)\.com$" ORIGIN=$0
Header set Access-Control-Allow-Origin %{ORIGIN}e env=ORIGIN
Header set Access-Control-Allow-Credentials "true" env=ORIGIN
# Always set Vary: Origin when it's possible you may send CORS headers
Header merge Vary Origin