Skip to content

Instantly share code, notes, and snippets.

View karlo527's full-sized avatar

Karlo karlo527

  • Sofia, Bulgaria
View GitHub Profile
@karlo527
karlo527 / get-script-promise.js
Created November 28, 2022 08:40 — forked from james2doyle/get-script-promise.js
Async load a script in the page and run it. Uses promises
// this function will work cross-browser for loading scripts asynchronously
function loadScript(src) {
return new Promise(function(resolve, reject) {
const s = document.createElement('script');
let r = false;
s.type = 'text/javascript';
s.src = src;
s.async = true;
s.onerror = function(err) {
reject(err, s);
@karlo527
karlo527 / .NET6Migration.md
Created July 5, 2022 11:30 — forked from davidfowl/.NET6Migration.md
.NET 6 ASP.NET Core Migration