Skip to content

Instantly share code, notes, and snippets.

View aggregate1166877's full-sized avatar
👾

aggregate1166877

👾
View GitHub Profile
@aggregate1166877
aggregate1166877 / webcryptoapi.html
Created November 17, 2023 16:35 — forked from deiu/webcryptoapi.html
Web Crypto API example: RSA keygen & export & import & sign & verify & encrypt & decrypt
<!-- MIT License -->
<html>
<head>
<script>
function generateKey(alg, scope) {
return new Promise(function(resolve) {
var genkey = crypto.subtle.generateKey(alg, true, scope)
genkey.then(function (pair) {
resolve(pair)
})
@aggregate1166877
aggregate1166877 / nginx.conf
Created June 21, 2023 14:13 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which

First, do whatever bundling you need to do, example:

npm run build-stuff

Log into NPM:

npm login
@aggregate1166877
aggregate1166877 / GodotCleanFisheyeBarrelDistortion.shader
Last active May 25, 2024 15:17
Godot fisheye / barrel distortion shader with minimal pixelation
/**
* This shader creates fisheye or barrel distortion by sliding values in the
* desired direction. It aims to have a minimal amount of pixelation, and was
* originally conceived of to procedurally generate cartoon planets and bodies
* from easily generatable flat textures.
*
* Thanks to user Dan (6145) on Stack Overflow for providing the math. I also
* stole some code from here for the texture placement:
* https://gist.github.com/quiglemj/971f4cec1b128c58b4864c5200bfc579
* This shader differs from the above gist in that it does not stretch the