Skip to content

Instantly share code, notes, and snippets.

View blaiseAI's full-sized avatar
🎯
Focusing

Blaise S. blaiseAI

🎯
Focusing
  • Devseb
  • 12:44 (UTC -06:00)
View GitHub Profile
@blaiseAI
blaiseAI / gist:686809de811dc791e74de12e4c2d2d2b
Created June 14, 2024 01:03
Authentication With Authorization Dotnet
Notes for Basic Authentication/Authorization in Blazor
Resources:
ASP.NET Core Blazor authentication and authorization
https://docs.microsoft.com/en-us/aspnet/core/blazor/security/?view=aspnetcore-3.1
IdentityManager
https://github.com/mguinness/IdentityManager/
Download: https://github.com/mguinness/IdentityManager/archive/master.zip
@blaiseAI
blaiseAI / countries
Created July 10, 2022 18:10
Lists of all countries and its regions
{"status":"OK","status-code":200,"version":"1.0","access":"public","data":{"DZ":{"country":"Algeria","region":"Africa"},"AO":{"country":"Angola","region":"Africa"},"BJ":{"country":"Benin","region":"Africa"},"BW":{"country":"Botswana","region":"Africa"},"BF":{"country":"Burkina Faso","region":"Africa"},"BI":{"country":"Burundi","region":"Africa"},"CV":{"country":"Cabo Verde","region":"Africa"},"CM":{"country":"Cameroon","region":"Africa"},"CF":{"country":"Central African Republic (the)","region":"Africa"},"TD":{"country":"Chad","region":"Africa"},"KM":{"country":"Comoros (the)","region":"Africa"},"CD":{"country":"Congo (the Democratic Republic of the)","region":"Africa"},"CG":{"country":"Congo (the)","region":"Africa"},"CI":{"country":"Côte d'Ivoire","region":"Africa"},"DJ":{"country":"Djibouti","region":"Africa"},"EG":{"country":"Egypt","region":"Africa"},"GQ":{"country":"Equatorial Guinea","region":"Africa"},"ER":{"country":"Eritrea","region":"Africa"},"SZ":{"country":"Eswatini","region":"Africa"},"ET":{"cou
@blaiseAI
blaiseAI / SQL DML Starter
Created April 15, 2021 03:44
DML Starter
CREATE TABLE Blogs (
BlogId INT IDENTITY (1, 1) NOT NULL,
Name NVARCHAR (200) NULL,
Url NVARCHAR (200) NULL,
CONSTRAINT [PK_dbo.Blogs] PRIMARY KEY CLUSTERED ([BlogId] ASC)
);
CREATE TABLE Posts (
PostId INT IDENTITY (1, 1) NOT NULL,
Title NVARCHAR (200) NULL,
@blaiseAI
blaiseAI / node_nginx_ssl.md
Created November 16, 2020 20:51 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

// index.js
/**
* Required External Modules
*/
/**
* App Variables
*/
@blaiseAI
blaiseAI / sample.vue
Created February 7, 2020 19:19
Vue Component
<template>
<div>
<h1> {{ message }} </h1>
<div
</template>
<script>
export default {
/* Child component registration */
components: {},
@blaiseAI
blaiseAI / bookmark.min.js
Created January 24, 2020 05:35 — forked from zaydek-old/bookmark.min.js
A *simple* CSS debugger. To use, bookmark "Debug CSS" at https://zaydek.github.io/debug.css. Learn more here https://medium.freecodecamp.org/88529aa5a6a3 and https://youtu.be/2QdzahteCCs?t=1m25s (starts at 1:25)
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();
/* :root {
--body-bg: #fafafa;
--body-color: #555;
--link-color: #222;
--link-color-hover: #000;
} */
/*=======
Dark Mode Media Query
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();