import { Text, View } from "react-native";
import Animated, {
Extrapolation,
interpolate,
useAnimatedScrollHandler,
useAnimatedStyle,
useSharedValue,
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
| # This script also runs on the VPS. | |
| # It handles the bits that require | |
| # root access. | |
| set -e | |
| if [ $(id -u) != 0 ]; then | |
| echo "You're not root" | |
| exit 1 | |
| fi |
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 { useCallback } from "react"; | |
| import { useQueryClient } from "@tanstack/react-query"; | |
| export default function useOptimisticUpdate() { | |
| const queryClient = useQueryClient(); | |
| return useCallback( | |
| async (queryKey, updater) => { | |
| await queryClient.cancelQueries({ queryKey }); |
Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:
project-root/
├── cmd/
│ ├── your-app-name/
│ │ ├── main.go # Application entry point
│ │ └── ... # Other application-specific files