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
| Write-Host Clear security certificates. Removes SSLCertificateSHA1Hash from the registry. | |
| $name = 'SSLCertificateSHA1Hash' | |
| $path = 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' | |
| Remove-ItemProperty -Path $path -Name $name -ErrorAction SilentlyContinue | |
| Set-ItemProperty -Path $path -Name 'MinEncryptionLevel' -Value 1 | |
| Set-ItemProperty -Path $path -Name 'SecurityLayer' -Value 0 | |
| Remove-ItemProperty -Path 'HKLM:\SYSTEM\ControlSet001\Control\Terminal Server\WinStations\RDP-Tcp' -Name $name -ErrorAction SilentlyContinue | |
| Remove-ItemProperty -Path 'HKLM:\SYSTEM\ControlSet002\Control\Terminal Server\WinStations\RDP-Tcp' -Name $name -ErrorAction SilentlyContinue | |
| Write-Host Clear security certificates. Set SSLCertificateSHA1Hash to . |
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 React, { | |
| createContext, | |
| useReducer, | |
| useEffect, | |
| useState, | |
| useContext, | |
| } from 'react'; | |
| import * as Oidc from 'oidc-client'; | |
| // Inspired by https://github.com/Swizec/useAuth |
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 System; | |
| using System.Threading; | |
| static class Program { | |
| static void Main() { | |
| Console.Write("Performing some task... "); | |
| using (var progress = new ProgressBar()) { | |
| for (int i = 0; i <= 100; i++) { | |
| progress.Report((double) i / 100); |
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 React, { useState, useCallback } from "react"; | |
| import { useBlurhash } from "./use-blurhash"; | |
| import { useInView } from "react-intersection-observer"; | |
| type Props = React.DetailedHTMLProps< | |
| React.ImgHTMLAttributes<HTMLImageElement>, | |
| HTMLImageElement | |
| > & { blurhash?: string | null }; | |
| // Uses browser-native `loading="lazy"` to lazy load images |
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
| .day { | |
| fill: #fff; | |
| stroke: #ccc; | |
| } | |
| .month { | |
| fill: none; | |
| stroke-width: 2px; | |
| } |
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 System; | |
| using System.Collections.Generic; | |
| using Microsoft.Extensions.Logging; | |
| using NHibernate; | |
| namespace App.Infrastructure | |
| { | |
| public class NHibernateMicrosoftLoggerFactory : INHibernateLoggerFactory | |
| { | |
| private readonly Microsoft.Extensions.Logging.ILoggerFactory loggerFactory; |
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 {useEffect, useRef, useState} from 'react'; | |
| import {debounce} from 'lodash'; | |
| export function useDebouncedValue<V>(value: V, wait: number) { | |
| const [debouncedValue, setDebouncedValue] = useState(value); | |
| const debounceRef = useRef<typeof setDebouncedValue>(); | |
| useEffect(() => { | |
| const debounceFn = debounce(setDebouncedValue, wait); | |
| debounceRef.current = debounceFn; |
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
| certutil -syncwithwu -f -f .\certs | |
| $certFiles = Get-ChildItem "$PSScriptRoot\certs\*.crt" | |
| $certCommands = $certFiles | %{'certutil -addstore root "%~dp0certs\' + $_.Name + '"'} | |
| extrac32 /Y .\certs\authrootstl.cab .\certs\authroot.stl | |
| extrac32 /Y .\certs\disallowedcertstl.cab .\certs\disallowedcert.stl | |
| extrac32 /Y .\certs\pinrulesstl.cab .\certs\pinrules.stl | |
| $outputCmdPath = "$PSScriptRoot\update-certs.cmd" |
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 python3 | |
| """ | |
| This is a simple program that will run a linting program on all non-binary | |
| files in history. It also rewrites commit hashes in commit messages to | |
| refer to the new commits with the rewritten files. | |
| See https://github.com/newren/git-filter-repo/issues/45 | |
| and https://github.com/newren/git-filter-repo/blob/main/contrib/filter-repo-demos/lint-history | |
| """ |
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 System; | |
| using System.Buffers; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.IO.Pipelines; | |
| using System.Text; | |
| using System.Text.Json; | |
| using System.Threading.Tasks; | |
| class Program |