Authentication is the act of verifying who a user is. When a user successfully authenticates (for example, by entering the correct credentials or token), the application establishes the user’s identity (often represented by a ClaimsPrincipal
in ASP.NET Core) (Introduction to authorization in ASP.NET Core | Microsoft Learn). In other words, authentication answers “Who are you?” and results in an identity that the app can use. By contrast, Authorization is about what the authenticated user is allowed to do or access. It answers “What are you allowed to do?” ([Introduction to authorization in ASP.NET Core | Microsoft Learn](https://learn.microsoft.com/en-us/aspnet/core/securit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/swift | |
@preconcurrency import WebKit | |
@preconcurrency import Foundation | |
@preconcurrency import Darwin | |
// Disable everything written to stderr | |
freopen("/dev/null", "w", stderr) | |
struct Cookie { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Remote host is the first argument | |
HOST=$1 | |
# Remote directory is a mirror of the local directory | |
DIR=$(pwd) | |
# SSH to the host and run the pull script | |
ssh $HOST "~/scripts/remotepull.sh '$DIR'" | |
# Sync Build notes not stored in git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ~/.idea-lazy.vim | |
" LazyVim mappings for Jetbrains IDEs | |
" Required plugins. https://plugins.jetbrains.com/bundles/7-ideavim-bundle | |
" IDEAVim | |
" Which-Key | |
" IdeaVim-Sneak | |
" To install, add this to the top of your ~/.ideavimrc: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fork of https://gist.github.com/b-nnett/2749adb44566239e4c85ad1a8937c2bc | |
// origin by @B_nnett → https://twitter.com/joshm/status/1648346253355282432?s=20 | |
/* | |
To set up this boost for chat.openai.com: | |
1) open Arc browser and login at chat.openai.com. | |
2) Head over to the + button in your sidebar and select New Boost. | |
Or hit ⌘ + T and type New Boost into your Command Bar. | |
3) Click the `Code` button. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require 'optparse' | |
# Have you ever been adding code to a Markdown post and | |
# wondered what syntax label would give you the right | |
# highlighting for your fenced code block? This script can | |
# take either a file extension or a common name of a language | |
# and let you know what lexers are supported for it, as well |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script context="module" lang="ts"> | |
import type * as $types from './$types' | |
export const csr = false | |
export const getData = (async (event) => { | |
return { | |
server: event.data.server, | |
client: 'client data!' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang="ts"> | |
import { updatestatus } from '$lib/UpdateStatus' | |
import type { PageData } from './$types' | |
export let data: PageData | |
</script> | |
{#each data.users as user} | |
<input | |
name="status" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import esbuild from "esbuild"; | |
import esbuildSvelte from "esbuild-svelte"; | |
import sveltePreprocess from "svelte-preprocess"; | |
import { readdir } from "fs/promises"; | |
async function allSvelteComponents() { | |
const baseDir = "./js/app/"; | |
const all = await readdir(baseDir); | |
return all.filter((f) => f.endsWith(".svelte")).map((f) => `${baseDir}${f}`); | |
} |
NewerOlder