Skip to content

Instantly share code, notes, and snippets.

View Keshav13142's full-sized avatar
๐Ÿš€

Keshav S Keshav13142

๐Ÿš€
View GitHub Profile
@letelete
letelete / use-schedule.ts
Last active March 8, 2025 05:03
A hook for scheduling function executions with deduplication and priority management. Requires: https://usehooks-ts.com/react-hook/use-unmount.
import { useCallback, useMemo, useRef } from 'react';
import { useUnmount } from '~lib/hooks/use-unmount';
import type { VoidFn } from '~lib/utils/types';
interface ScheduleOptions {
tag?: string;
}
interface ScheduleOnceOptions {
@leodevbro
leodevbro / gmail-stats.gs
Last active January 17, 2025 10:38
In Gmail inbox, Find sender with most mail threads
// Original script: https://gist.github.com/leodevbro/2987e8874a18b2086ea6cc1aa3c494e8
// v2.5
// Google Apps Script is a coding language based on JavaScript.
// This Apps Script code helps us to sort addresses by most threads.
// A thread is a group of messages, as a conversation.
const modes = {
inbox: "inbox", // to analyze threads in the "Inbox" folder
outbox: "outbox", // to analyze threads in the "Sent" folder
@HimDek
HimDek / Hyper-V in Windows 10 and Windows 11 Home Edition.md
Last active April 26, 2025 07:34
Hyper-V is supported in Pro, Enterprise and Education Edition of Windows 10 and Windows 11. This guide will show you how to enable Hyper-V in Home Editions of Windows 10 and Windows 11.

Hyper-V in Windows 10 and Windows 11 Home Edition

Hyper-V in Windows 10 and Windows 11 allows running Virtual Machine. It is supported only in Pro, Enterprise and Education Edition of Windows 10 and Windows 11 by default. But this guide will show you how to enable it in Home Editions of Windows 10 and Windows 11.

Check if virtualization is enabled:

  • Search for Command Prompt in Windows Start Menu and open it.
  • Type systeminfo and press Enter. Wait for the process to finish
  • Once the results appear, search for the Hyper-V Requirements section which is usually the last one. 11
    • If it says A hypervisor has been detected. Features required for Hyper-V will not be displayed. that means Hyper-V is already enabled and there is no reason following this guide anymore.
  • Otherwise, check for Virtualization Enabled in Firmware:.
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
import { PusherProvider } from '@harelpls/use-pusher'
// _app.js
const config = {
clientKey: 'your-pusher-client-key',
cluster: 'us2',
// required for private/presence channels
authEndpoint: '/api/pusher/auth'
}
const App = ({ Component, pageProps }) => (
@NickMcSweeney
NickMcSweeney / postgresql_plus_arch-linux.md
Last active April 27, 2025 22:07
Getting postgresql running on Arch Linux

Setup Postgresql

run postgresql with systemctl

Install postgres

latest

sudo pacman -S postgresql

specific version

find version & build from source