Skip to content

Instantly share code, notes, and snippets.

View seanaguinaga's full-sized avatar
🏠
Working from home

Sean Aguinaga seanaguinaga

🏠
Working from home
View GitHub Profile
@seanaguinaga
seanaguinaga / result.ts
Created April 22, 2025 17:32 — forked from mohilcode/result.ts
typescript implementation of the result pattern for functional error handling. provides type-safe alternatives to try/catch with monadic operations for composition. use this to make error handling explicit in your function signatures and avoid throwing exceptions
export type Success<T> = {
readonly type: 'success'
readonly data: T
readonly error?: never
}
export type Failure<E> = {
readonly type: 'failure'
readonly data?: never
readonly error: E
#!/usr/bin/env python3
"""
Human quality transcripts from audio files using
AssemblyAI for transcription and Google's Gemini for enhancement.
Requirements:
- AssemblyAI API key (https://www.assemblyai.com/)
- Google API key (https://aistudio.google.com/)
- Python packages: assemblyai, google-generativeai, pydub

Easy Telemetry Disable for 10/11

Prerequisites

  1. Upgrade to Enterprise edition of Windows 10/11 if you are running Home or Pro.
    • You can do this through the Change Edition option in the Extras menu in MAS.

Disabling

  1. Open the Group Policy Editor. Search for "Edit Group Policy" in search or run gpedit.msc.
@seanaguinaga
seanaguinaga / useTextSelection.ts
Created February 12, 2024 14:31 — forked from KristofferEriksson/useTextSelection.ts
A React Typescript hook that tracks user text selections & their screen positions
import { useEffect, useState } from "react";
type UseTextSelectionReturn = {
text: string;
rects: DOMRect[];
ranges: Range[];
selection: Selection | null;
};
const getRangesFromSelection = (selection: Selection): Range[] => {
@seanaguinaga
seanaguinaga / useLocation.ts
Created February 12, 2024 14:31 — forked from KristofferEriksson/useLocation.ts
A React Typescript hook that provides real-time geolocation data, complete with heading and speed metrics
import { useEffect, useState } from "react";
interface LocationOptions {
enableHighAccuracy?: boolean;
timeout?: number;
maximumAge?: number;
}
interface LocationState {
coords: {
@seanaguinaga
seanaguinaga / firestore.ts
Created December 1, 2023 19:04 — forked from JamieCurnow/firestore.ts
Using Firestore with Typescript
/**
* This Gist is part of a medium article - read here:
* https://jamiecurnow.medium.com/using-firestore-with-typescript-65bd2a602945
*/
// import firstore (obviously)
import { firestore } from "firebase-admin"
// Import or define your types
// import { YourType } from '~/@types'