Skip to content

Instantly share code, notes, and snippets.

View yanjun-zhou6's full-sized avatar
🌴
In hot days

YanJun Zhou yanjun-zhou6

🌴
In hot days
View GitHub Profile
@yanjun-zhou6
yanjun-zhou6 / rAF.js
Created July 21, 2019 03:39 — forked from paulirish/rAF.js
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@yanjun-zhou6
yanjun-zhou6 / gist:47a19fe9f327af8914b777d557f5c491
Created April 20, 2024 11:35 — forked from getify/gist:1b26accb1a09aa53ad25
first draft sketch of a "Worker" polyfill
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Worker Polyfill</title>
<script src="polyfill.worker.js"></script>
</head>
<body>
<h1>Worker Polyfill</h1>
<script>
@yanjun-zhou6
yanjun-zhou6 / Self-Signed SSL with SAN.md
Created October 28, 2024 03:01 — forked from KeithYeh/Self-Signed SSL with SAN.md
Create self-signed SSL certificate with SubjectAltName(SAN)

How to create a self-signed SSL Certificate with SubjectAltName(SAN)

After Chrome 58, self-signed certificate without SAN is not valid anymore.

Step 1: Generate a Private Key

openssl genrsa -des3 -out example.com.key 2048

Step 2: Generate a CSR (Certificate Signing Request)

{
"environment": "staging"
}