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 bash | |
| set -euo pipefail | |
| # Root folder of your .NET installs. | |
| # Override by exporting DOTNET_VERSIONS_ROOT if you don't use $HOME/dotnet | |
| DOTNET_VERSIONS_ROOT="${DOTNET_VERSIONS_ROOT:-"$HOME/dotnet"}" | |
| die() { | |
| echo "error: $*" >&2 | |
| exit 1 |
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
| # Installing Android SDKs and accepting SDK license agreements for a net10.0-android project. | |
| # Requires JDK 17 now, up from JDK 11 requirement in net9.0-android. | |
| # Target is InstallAndroidDependencies, so this won't actualy build the project, still need to run dotnet build. | |
| dotnet build -t:InstallAndroidDependencies -f net10.0-android "-p:AndroidSdkDirectory=/home/peter/Android/Sdk" "-p:AcceptAndroidSDKLicenses=true" |
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 bash | |
| set -euo pipefail | |
| #--- helpers ---------------------------------------------------------------# | |
| need() { command -v "$1" >/dev/null 2>&1 || { echo "Missing dependency: $1" >&2; exit 1; }; } | |
| die() { gum style --foreground 1 --bold "Error:" -- "$*"; exit 1; } | |
| need awk | |
| need curl | |
| need gum |
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
| <Application xmlns="https://github.com/avaloniaui" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:themes="clr-namespace:Material.Styles.Themes;assembly=Material.Styles" | |
| xmlns:dialogs="clr-namespace:DialogHostAvalonia;assembly=DialogHost.Avalonia" | |
| xmlns:infrastructure="clr-namespace:Gringotts.Infrastructure" | |
| x:Class="Gringotts.App" | |
| RequestedThemeVariant="Default"> | |
| <Application.DataTemplates> | |
| <infrastructure:SourceGeneratedViewLocator/> |
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
| using Gringotts.Core.Models; | |
| using Microsoft.Extensions.FileSystemGlobbing; | |
| namespace Gringotts.Core.Services; | |
| public class VaultIgnore | |
| { | |
| private readonly string _ignore; | |
| private Matcher _matcher = DefaultMatcher; | |
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
| -- credit https://stackoverflow.com/a/19103574 | |
| create or replace function delete_cascade(p_schema varchar, p_table varchar, p_key varchar, p_recursion varchar[] default null) | |
| returns integer as $$ | |
| declare | |
| rx record; | |
| rd record; | |
| v_sql varchar; | |
| v_recursion_key varchar; | |
| recnum integer; | |
| v_primary_key varchar; |
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 | |
| # Color codes | |
| GREEN='\033[0;32m' | |
| RED='\033[0;31m' | |
| NC='\033[0m' # No Color | |
| compare_versions() { | |
| local LATEST="$1" | |
| local CURRENT="$2" |
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
| package com.example.app.interceptors; | |
| import static jakarta.servlet.http.HttpServletResponse.SC_NOT_FOUND; | |
| import com.example.app.config.RouteProperties; | |
| import jakarta.servlet.ServletException; | |
| import jakarta.servlet.http.HttpServletRequest; | |
| import jakarta.servlet.http.HttpServletResponse; | |
| import jakarta.validation.constraints.NotNull; | |
| import java.io.IOException; |
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
| public static class GuidBackport | |
| { | |
| private const ushort Version7Value = 0x7000; | |
| private const ushort VersionMask = 0xF000; | |
| private const byte Variant10xxValue = 0x80; | |
| private const byte Variant10xxMask = 0xC0; | |
| /** | |
| * Backport of Guid.CreateVersion7() from .NET 9 | |
| */ |
NewerOlder