This file contains 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 {ReactNode, ReactElement} from "react"; | |
import RootComponent from "@/components/root"; | |
export default function RootLayout({ children }: { children: ReactNode }): ReactElement { | |
return ( | |
<html suppressHydrationWarning> | |
<body> | |
<RootComponent> | |
{children} | |
</RootComponent> |
This file contains 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
const twitterUrlRegex = /(https?:\/\/)(www.)?twitter.com\//g; | |
export function getTwitterHandleFromUrl(profileUrl: string): string { | |
const twitterUserName = profileUrl.replaceAll(twitterUrlRegex, ``); | |
if (twitterUserName) { | |
return `@${twitterUserName}`; | |
} | |
return ``; |
This file contains 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
export default function compare<T>(a0: T, b0: T): number { | |
if (a0 === b0) return 0; | |
if (a0 > b0) return 1; | |
return -1; | |
} |
This file contains 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
/* | |
This tag function enables the entry of Tailwind classes within a template string | |
without cluttering the source DOM with unnecessary whitespace. This approach is | |
better than using the `classnames` package since commas are not needed to break | |
classes into separate lines. Additionally, it's easier to organize and rearrange | |
classes within a template string compared to using `classnames`. | |
Simply copy the function below and paste it in a utilities file or another | |
location where it makes sense to be imported from. | |
This file contains 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/python3 | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are | |
# met: | |
# | |
# (1) Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# | |
# (2) Redistributions in binary form must reproduce the above copyright |
This file contains 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
#Requires -RunAsAdministrator | |
param( | |
[Parameter(Mandatory)] | |
[string]$BackupPath | |
) | |
# You can use this function on its own instead of using the entirety of this script | |
function SyncFiles { | |
param ( |
This file contains 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
#NoEnv | |
#Warn | |
#SingleInstance force | |
SendMode Input | |
SetWorkingDir %A_ScriptDir% | |
disableCommand := A_ScriptDir . "\DisableOfficeKey.ps1" | |
enableCommand := disableCommand . " -Reenable" | |
!^+`:: |
This file contains 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
# DisableOfficeHotKeys | |
# | |
# This script disables the hot keys that Windows 10 uses as a result of hijacking | |
# the Hyper key (Alt + Ctrl + Shift + Win/Super/Command), otherwise known as the | |
# Office key on some Microsoft devices. This is accomplished by stopping the | |
# explorer process and registering the hot keys before explorer has a chance to | |
# do so. The hot keys are then unregistered so that they are free for other use | |
# cases. This process is reversible via the -Reenable flag. | |
# | |
# References: |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<Project DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup Condition=" '$(BuildConfiguration)' == '' "> | |
<BuildConfiguration>Release</BuildConfiguration> | |
</PropertyGroup> | |
<PropertyGroup> | |
<TestResultFile>$(SolutionDir)TestResult.xml</TestResultFile> | |
</PropertyGroup> |