Skip to content

Instantly share code, notes, and snippets.

View tigawanna's full-sized avatar

Dennis kinuthia tigawanna

  • Nairobi Kenya
View GitHub Profile

Large Header Style Animation on Android

Code

import { Text, View } from "react-native";
import Animated, {
  Extrapolation,
  interpolate,
  useAnimatedScrollHandler,
  useAnimatedStyle,
  useSharedValue,
@rodydavis
rodydavis / main.dart
Last active November 29, 2025 03:02
SQLite CRDT + Session Extension
import 'dart:ffi';
import 'dart:io';
import 'dart:typed_data';
import 'package:sqlite3/sqlite3.dart';
import 'package:sqlite3/src/ffi/implementation.dart';
void main() {
final lib = DynamicLibrary.open('cr-sqlite/core/dist/sqlite3');
final sqlite3 = FfiSqlite3(lib);
@cyco130
cyco130 / dploy-nginx.sh
Created April 8, 2024 09:26
Simple deployment manager
# 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
@pingrishabh
pingrishabh / useOptimisticUpdate.js
Created September 24, 2023 08:36
Simple hook to perform optimistic updates with react-query
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 });
@ayoubzulfiqar
ayoubzulfiqar / folder_structure.md
Created September 5, 2023 06:12
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

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