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
find . -iname "bin" -o -iname "obj" | xargs rm -rf |
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 type { | |
FormsStackParamList, | |
RootStackParamList, | |
} from '@your/app'; | |
import type { | |
NavigationState, | |
ParamListBase, | |
PartialState, | |
Route, | |
} from '@react-navigation/native'; |
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
cloc --exclude-dir=vendor,.xcodeproj,xcuserdata,build,Pods,node_modules,.gradle,dist,yarn.lock,package-lock.json . |
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 React, { type PropsWithChildren } from 'react'; | |
import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client'; | |
import { onlineManager } from '@tanstack/react-query'; | |
import { queryClient } from './queryClient'; | |
import { storagePersister } from './storagePersister'; | |
export function QueryClientProvider(props: PropsWithChildren) { | |
return ( | |
<PersistQueryClientProvider | |
client={queryClient} |
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
/** | |
* Example usage: | |
* | |
* // default depth of 3: (fastest) | |
* type keys = Paths<SomeNestedObject> // returns "property" | "nested.property" | "nested.nested.property" | |
* | |
* // depth of 10: (can be slow) | |
* type keys = Paths<SomeNestedObject, 10> | |
* | |
* // depth of 10 with keys of type string and number: (slowest) |
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
internal class ExpressionWhereFinder : ExpressionVisitor | |
{ | |
private readonly IList<MethodCallExpression> _whereExpressions = new List<MethodCallExpression>(); | |
public IEnumerable<MethodCallExpression> GetWhere(Expression expression) | |
{ | |
Visit(expression); | |
return _whereExpressions; | |
} |
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
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg | |
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | |
sudo apt update && sudo apt install terraform |
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
public class TokenSigningRequest | |
{ | |
public string AppleTeamId { get; set; } | |
public string AppleServiceId { get; set; } | |
public string AppleKeyId { get; set; } | |
public string P8key { get; set; } | |
} | |
[HttpPost] | |
public async Task<IActionResult> CreateSignedToken([FromBody, BindRequired] TokenSigningRequest requestBody) |
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/bash | |
declare -a repos=( | |
"$HOME/Projects/myproject/testing/.git" | |
"$HOME/Projects/myproject/testing-bundle/.git" | |
"$HOME/Projects/myproject/service-skeleton/.git" | |
"$HOME/Projects/myproject/documentation-web/.git" | |
"$HOME/Projects/myproject/documentation-api/.git" | |
"$HOME/Projects/myproject/coding-standard/.git" | |
"$HOME/Projects/myproject/context/microservice1/.git" |
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
steps: | |
- script: | | |
DOTNET_VERSION="6.0.1xx" | |
DOTNET_TEMP_DIRECTORY=$(cat /dev/urandom | env LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1) | |
DOTNET_INSTALL_LOCATION="$(Agent.TempDirectory)/$DOTNET_TEMP_DIRECTORY" | |
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --architecture arm64 --channel "$DOTNET_VERSION" --install-dir "$DOTNET_INSTALL_LOCATION" | |
PATH="$PATH:$DOTNET_INSTALL_LOCATION" | |
echo "##vso[task.setvariable variable=PATH;]$PATH" | |
displayName: Install .NET 6.0 SDK |
NewerOlder