file_path stringlengths 3 280 | file_language stringclasses 66
values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108
values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
topo3d.py | Python | from typing import Tuple
import torch
from torch import Tensor
import torch.nn.functional as F
from torch.autograd import Function
from topologylayer.nn import LevelSetLayer2D, TopKBarcodeLengths
import time
from torch.multiprocessing import get_context
from skimage.measure import label
def _get_slice_gradients(input... | AbdBarho/Parallel3DTopologyLayer | 0 | A 3D slice-wise-parallel version of Topology Layer | Python | AbdBarho | ||
.eslintrc.js | JavaScript | module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
sourceType: "module",
},
plugins: ["@typescript-eslint/eslint-plugin", "prettier"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
root: true,
env: {
... | AbdBarho/s3-serve | 8 | A utility for serving files from S3 | TypeScript | AbdBarho | ||
examples/express.mjs | JavaScript | import { S3Client } from '@aws-sdk/client-s3';
import Express from 'express';
import dotenv from 'dotenv';
import { s3Get, extractGetArgs } from '../build/index.js';
dotenv.config();
const app = Express();
const client = new S3Client({
region: 'eu-central-1',
credentials: {
accessKeyId: process.env.KEY,
s... | AbdBarho/s3-serve | 8 | A utility for serving files from S3 | TypeScript | AbdBarho | ||
examples/fastify.mjs | JavaScript | import Fastify from 'fastify';
import { S3Client } from '@aws-sdk/client-s3';
import dotenv from 'dotenv';
import { s3Get, extractGetArgs } from '../build/index.js';
dotenv.config();
const client = new S3Client({
region: 'eu-central-1',
credentials: {
accessKeyId: process.env.KEY,
secretAccessKey: proces... | AbdBarho/s3-serve | 8 | A utility for serving files from S3 | TypeScript | AbdBarho | ||
src/index.ts | TypeScript | export { s3Get, extractGetArgs } from './lib/s3Get';
| AbdBarho/s3-serve | 8 | A utility for serving files from S3 | TypeScript | AbdBarho | ||
src/lib/S3Response.ts | TypeScript | import type { ResponseMetadata } from '@aws-sdk/types';
import type { IncomingMessage } from 'http';
import type { Headers } from './headers';
export interface S3Response {
/**
* The body of the S3 response, this is the raw
* [IncomingMessage](https://nodejs.org/api/http.html#class-httpincomingmessage)
* re... | AbdBarho/s3-serve | 8 | A utility for serving files from S3 | TypeScript | AbdBarho | ||
src/lib/headers.ts | TypeScript | export type Headers = Record<string, string>;
export const splitResponseHeaders = (baseHeaders: Headers) => {
const headers: Headers = {};
const s3Headers: Headers = {};
for (const [key, value] of Object.entries(baseHeaders)) {
const header = key.toLowerCase();
if (header.startsWith('x-amz-') || header =... | AbdBarho/s3-serve | 8 | A utility for serving files from S3 | TypeScript | AbdBarho | ||
src/lib/s3Get.ts | TypeScript | import { GetObjectCommand, GetObjectCommandInput, S3Client } from '@aws-sdk/client-s3';
import { IncomingHttpHeaders } from 'http';
import { splitResponseHeaders, HEADER_TO_PARAM, Headers, valueToType } from './headers';
import { S3Response } from './S3Response';
/**
* Get a file from S3
*
* @param {S3Client} clien... | AbdBarho/s3-serve | 8 | A utility for serving files from S3 | TypeScript | AbdBarho | ||
test/headers.spec.ts | TypeScript | import { splitResponseHeaders } from '../src/lib/headers';
import { extractGetArgs } from '../src/lib/s3Get';
const standardHeaders = {
'content-type': 'A',
'Accept-Encoding': 'gzip, deflate, br',
'Cache-Control': 'no-cache',
};
const awsSpecificHeaders = {
'x-amz-test': 'value',
'X-Amz-SHA': 'value',
ser... | AbdBarho/s3-serve | 8 | A utility for serving files from S3 | TypeScript | AbdBarho | ||
test/se3Get.spec.ts | TypeScript | import nock from 'nock';
import { S3Client } from '@aws-sdk/client-s3';
import { s3Get } from '../src/lib/s3Get';
import { IncomingMessage } from 'http';
describe('ServeS3', () => {
afterAll(() => nock.enableNetConnect());
const client = new S3Client({
region: 'eu-central-1',
credentials: {
accessKe... | AbdBarho/s3-serve | 8 | A utility for serving files from S3 | TypeScript | AbdBarho | ||
main.py | Python | from angel_claw.main import main
if __name__ == "__main__":
main()
| Abdur-rahmaanJ/angel-claw | 0 | Based, solid, lean implementation of OpenClaw. Grown with care. Python :heart: | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
src/angel_claw/__main__.py | Python | from .main import main
if __name__ == "__main__":
main()
| Abdur-rahmaanJ/angel-claw | 0 | Based, solid, lean implementation of OpenClaw. Grown with care. Python :heart: | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
src/angel_claw/agent.py | Python | import litellm
from .models import Message, Role
from .memory import memory_manager
from .config import settings
from typing import List, Optional
class Agent:
def __init__(self, session_id: str, model: str = None):
self.session_id = session_id
self.model = model or settings.model
self.memo... | Abdur-rahmaanJ/angel-claw | 0 | Based, solid, lean implementation of OpenClaw. Grown with care. Python :heart: | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
src/angel_claw/config.py | Python | from pydantic_settings import BaseSettings, SettingsConfigDict
from pydantic import Field
from typing import Optional
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
# Gateway Settings
host: str = "0.0.0.0"
port: int = 800... | Abdur-rahmaanJ/angel-claw | 0 | Based, solid, lean implementation of OpenClaw. Grown with care. Python :heart: | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
src/angel_claw/gateway.py | Python | from fastapi import FastAPI, HTTPException
from .models import AgentRequest, AgentResponse
from .agent import Agent
import uvicorn
app = FastAPI(title="Angel Claw Gateway")
@app.post("/chat", response_model=AgentResponse)
async def chat(request: AgentRequest):
try:
agent = Agent(request.session_id, model=... | Abdur-rahmaanJ/angel-claw | 0 | Based, solid, lean implementation of OpenClaw. Grown with care. Python :heart: | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
src/angel_claw/main.py | Python | from .gateway import start
def main():
start()
if __name__ == "__main__":
main()
| Abdur-rahmaanJ/angel-claw | 0 | Based, solid, lean implementation of OpenClaw. Grown with care. Python :heart: | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
src/angel_claw/memory.py | Python | from angel_recall import MemOS
from .config import settings
import os
class MemoryManager:
def __init__(self):
if not os.path.exists(settings.memory_persist_dir):
os.makedirs(settings.memory_persist_dir)
def get_memos(self, session_id: str) -> MemOS:
persist_dir = os.pa... | Abdur-rahmaanJ/angel-claw | 0 | Based, solid, lean implementation of OpenClaw. Grown with care. Python :heart: | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
src/angel_claw/models.py | Python | from pydantic import BaseModel
from typing import List, Optional, Any
from enum import Enum
class Role(str, Enum):
USER = "user"
ASSISTANT = "assistant"
SYSTEM = "system"
TOOL = "tool"
class Message(BaseModel):
role: Role
content: str
name: Optional[str] = None
class Conversation(BaseMode... | Abdur-rahmaanJ/angel-claw | 0 | Based, solid, lean implementation of OpenClaw. Grown with care. Python :heart: | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
tests/test_basic.py | Python | import pytest
from angel_claw.agent import Agent
from angel_claw.memory import memory_manager
import os
import shutil
@pytest.fixture
def cleanup_vaults():
vault_dir = "./test_vaults"
if os.path.exists(vault_dir):
shutil.rmtree(vault_dir)
os.makedirs(vault_dir)
# Monkeypatch settings
from a... | Abdur-rahmaanJ/angel-claw | 0 | Based, solid, lean implementation of OpenClaw. Grown with care. Python :heart: | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
main.py | Python | #!/usr/bin/env python3
"""
Angel Recall: The Memory Operating System Demo
Demonstrates multi-user isolation, access governance, and lane-based execution.
"""
import time
import threading
import shutil
import os
from langchain_core.messages import HumanMessage
from angel_recall import (
MemOS,
AccessScope,
... | Abdur-rahmaanJ/angel-recall | 1 | Agentic memory at it's finest! | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
src/angel_recall/__init__.py | Python | #!/usr/bin/env python3
"""
Angel Recall: Agentic memory based on MemOS.
- Unified memory structure (MemCube)
- Hybrid retrieval (Semantic + Graph)
- Lane-Based Command Queue (Sequential execution per session)
- Tool support for LangGraph
"""
import json
import uuid
import threading
from dataclasses import dataclass, f... | Abdur-rahmaanJ/angel-recall | 1 | Agentic memory at it's finest! | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
src/angel_recall/cli.py | Python | import argparse
from .dashboard.app import app
def main():
parser = argparse.ArgumentParser(prog="angel-recall")
subparsers = parser.add_subparsers(dest="command")
memos_parser = subparsers.add_parser("memos", help="Launch the memory dashboard")
memos_parser.add_argument("--port", type=int, defaul... | Abdur-rahmaanJ/angel-recall | 1 | Agentic memory at it's finest! | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
src/angel_recall/dashboard/app.py | Python | import os
from flask import Flask, render_template, request, jsonify
from .. import MemOS, create_memory_agent, AccessScope, SemanticType
from langchain_core.messages import HumanMessage
import litellm
app = Flask(__name__)
# Initialize MemOS with a default local model
# Users can change this via the dashboard
VAULT_... | Abdur-rahmaanJ/angel-recall | 1 | Agentic memory at it's finest! | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
src/angel_recall/dashboard/templates/index.html | HTML | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Angel Recall Dashboard</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body { ba... | Abdur-rahmaanJ/angel-recall | 1 | Agentic memory at it's finest! | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
tests/test_agent.py | Python | import pytest
import shutil
import os
from unittest.mock import patch, MagicMock
from langchain_core.messages import HumanMessage, AIMessage
from angel_recall import MemOS, create_memory_agent
# Use a lightweight model for testing if possible, or same as core tests
TEST_MODEL = "gemini/gemini-2.5-flash"
TEST_VAULT = "... | Abdur-rahmaanJ/angel-recall | 1 | Agentic memory at it's finest! | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
tests/test_core.py | Python | import pytest
import shutil
import os
import time
import threading
from angel_recall import MemOS, SemanticType, AccessScope
# Model specified by user
TEST_MODEL = "gemini/gemini-2.5-flash"
TEST_VAULT = "./test_vault_qwen"
@pytest.fixture(scope="module")
def memos():
# Cleanup before test
if os.path.exists(TE... | Abdur-rahmaanJ/angel-recall | 1 | Agentic memory at it's finest! | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
kapsula.py | Python | import os
import ast
from typing import List, Tuple
import sys
def get_file_docstring(filepath: str) -> str:
with open(filepath, 'r') as file:
try:
tree = ast.parse(file.read(), filename=filepath)
except:
return ""
return ast.get_docstring(tree) or ""
def get_function_i... | Abdur-rahmaanJ/kapsula | 1 | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy | |
sensor.py | Python | """
Mauritius Weather Component for Home Assistant
https://github.com/Abdur-rahmaanJ/meteomoris
For more information about Home Assistant custom components, visit:
https://developers.home-assistant.io/docs/creating_component_index
"""
import logging
import voluptuous as vol
from datetime import timedelta
from homeass... | Abdur-rahmaanJ/meteomoris-home-assistant | 2 | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy | |
mmm.py | Python | from oreiller import Oreiller as orey
w, h = 220, 190
shape = [(40, 40), (w - 10, h - 10)]
img = orey.new("RGB", (w, h))
orey.fill(None)
orey.oline(40, 40, w-10, h-10, width=0)
img.show()
orey.cleanup() | Abdur-rahmaanJ/oreiller | 0 | The package for easy image manipulation backed by pillow power. | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
oreiller/__init__.py | Python | from .oreiller import Oreiller
__version__ = "0.2.0" | Abdur-rahmaanJ/oreiller | 0 | The package for easy image manipulation backed by pillow power. | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
oreiller/oreiller.py | Python |
try:
from PIL import Image
from PIL import ImageDraw
from pilmoji import Pilmoji
except ImportError:
pass
class Oreiller:
image = None
_images = []
_fill = None
_font = None
@classmethod
def open(cls, *args, **kwargs):
img = Image.open(*args, **kwargs)
cls._ima... | Abdur-rahmaanJ/oreiller | 0 | The package for easy image manipulation backed by pillow power. | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
setup.py | Python | """A setuptools based setup module.
See:
https://packaging.python.org/guides/distributing-packages-using-setuptools/
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup
from os import path
import os
import sys
from oreiller import __version__
# io.open is n... | Abdur-rahmaanJ/oreiller | 0 | The package for easy image manipulation backed by pillow power. | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
main.py | Python | from pageindex_open import *
PDF_FILE = "~/Downloads/2023-annual-report-truncated.pdf"
QUERY = "what about financial stability?"
pio = PIO(PDF_FILE)
pio.build_index()
answer = pio.query(QUERY, top_k=2)
print(answer) | Abdur-rahmaanJ/pageindex-open | 0 | Truely open pageindex rag package | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
src/pageindex_open/__init__.py | Python | import json
import re
from pathlib import Path
from typing import List, Dict, Any
import litellm
from pymupdf4llm import to_markdown
def pdf_to_markdown(pdf_path: str) -> str:
return to_markdown(pdf_path)
HEADING_RE = re.compile(r"^(#{1,6})\s+(.*)")
def build_md_structure(md: str, doc_name: str) -> Dict[str, A... | Abdur-rahmaanJ/pageindex-open | 0 | Truely open pageindex rag package | Python | Abdur-rahmaanJ | Abdur-Rahmaan Janhangeer | compileralchemy |
app/[username]/page.tsx | TypeScript (TSX) | import { fetchUsers, fetchStreak } from "../actions/users";
import { fetchProblems } from "../actions/problems";
import Table from "./table";
export const generateStaticParams = async () => {
const users = await fetchUsers();
return users.map(({ username }) => ({
username: username.toLowerCase(),
}));
};
co... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/[username]/streak.tsx | TypeScript (TSX) | import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { cn } from "@/lib/utils";
import { Flame } from "lucide-react";
interface StreakProps {
data: {
streakCount: number;
currentDayCompleted: boolean;
};
}
const Streak = ({ data }: StreakProps... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/[username]/table.tsx | TypeScript (TSX) | "use client";
import {
flexRender,
getCoreRowModel,
getPaginationRowModel,
getSortedRowModel,
useReactTable,
} from "@tanstack/react-table";
import { User } from "@prisma/client";
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table";
import { But... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/[username]/user-select.tsx | TypeScript (TSX) | import { Avatar, AvatarImage } from "@/components/ui/avatar";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
import { UserRanked } from "@/types/user";
import { User } from "@prisma/client";
import { AvatarFallback } from "@radix-ui/react-avatar";
impo... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/[username]/utils.tsx | TypeScript (TSX) | "use client";
import { Button, buttonVariants } from "@/components/ui/button";
import ColumnHeader from "@/components/ui/table/column-header";
import { cn } from "@/lib/utils";
import { ColumnDef } from "@tanstack/react-table";
import { Star } from "lucide-react";
import Link from "next/link";
import { SCORE } from "@/... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/actions/analytics.ts | TypeScript | "use server";
// TODO: The logic is written without any time-zone offset to Asia/Kolkata.
// This will work as long as the deployment is done to a server hosted in India.
import { SCORE } from "@/lib/constants/score";
import prisma from "@/lib/prisma";
import { Problem } from "@prisma/client";
import { SYNC_START_DAT... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/actions/constants.ts | TypeScript | export type SubmissionResponse = {
title: string;
titleSlug: string;
timestamp: number;
};
export const LEET_CODE_GRAPH_URL = "https://leetcode.com/graphql";
export const LEET_CODE_HEADERS = {
"Content-Type": "application/json",
Referer: "https://leetcode.com",
};
export const SYNC_START_DATE = new Date(20... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/actions/problems.ts | TypeScript | "use server";
import prisma from "@/lib/prisma";
import { PrismaClientKnownRequestError } from "@prisma/client/runtime/library";
import { revalidatePath } from "next/cache";
import { fetchSubmissionsAndSyncWithDB } from "./utils";
import { FavoriteProblem, ProblemWithTopics } from "@/types/problem";
export const fetc... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/actions/users.ts | TypeScript | "use server";
import { SCORE } from "@/lib/constants/score";
import prisma from "@/lib/prisma";
import { UserRanked } from "@/types/user";
import { ONE_DAY_IN_SECONDS, TIMEZONE } from "./constants";
export const fetchUsers = async (): Promise<UserRanked[]> => {
const users = await prisma.user.findMany({
include... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/actions/utils.ts | TypeScript | "use server";
import { Topic, User } from "@prisma/client";
import {
LEET_CODE_HEADERS,
LEET_CODE_GRAPH_URL,
PROBLEM_DETAILS_QUERY,
SubmissionResponse,
SUBMISSIONS_QUERY,
SYNC_START_DATE,
} from "./constants";
import prisma from "@/lib/prisma";
const fetchSubmissions = async (username: string) => {
cons... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/analytics/analytics/index.tsx | TypeScript (TSX) | "use client";
import { ScoreProgression as ScoreProgressionType } from "@/types/analytics";
import ScoreProgression from "./score-progression";
import UserSelect from "@/app/favorites/user-select";
import { useState } from "react";
import { User } from "@prisma/client";
interface AnalyticsProps {
users: User[];
a... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/analytics/analytics/score-progression.tsx | TypeScript (TSX) | import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import {
ChartConfig,
ChartContainer,
ChartLegend,
ChartLegendContent,
ChartTooltip,
ChartTooltipContent,
} from "@/component... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/analytics/analytics/utils.ts | TypeScript | import { User } from "@prisma/client";
export const buildChartConfig = (users: User[]) =>
users.reduce(
(config, user, index) => ({
...config,
[user.username]: {
label: user.name,
color: `hsl(var(--char-${index + 1}))`,
},
}),
{},
);
export const formattedDate = (date... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/analytics/page.tsx | TypeScript (TSX) | import { fetchScoreProgression } from "../actions/analytics";
import { fetchUsers } from "../actions/users";
import Data from "./analytics";
const Analytics = async () => {
const [users, scoreProgression] = await Promise.all([
fetchUsers(),
fetchScoreProgression(),
]);
return (
<div className="conta... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/api/backup/route.ts | TypeScript | import prisma from "@/lib/prisma";
import zlib from "zlib";
export async function POST() {
const [users, problems, topics] = await Promise.all([
prisma.user.findMany(),
prisma.problem.findMany(),
prisma.topic.findMany(),
]);
const data = JSON.stringify({ users, problems, topics });
return new Resp... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/api/sync/route.ts | TypeScript | import { syncWithLeetCode } from "@/app/actions/problems";
export async function POST() {
const { success, error } = await syncWithLeetCode();
if (success) {
return Response.json({ message: "Sync successful" });
} else {
return Response.json({ message: (error as Error).message });
}
}
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/favorites/page.tsx | TypeScript (TSX) | import Table from "./table";
import { fetchFavoriteProblems } from "../actions/problems";
import { fetchUsers } from "../actions/users";
const Favorites = async () => {
const [problems, users] = await Promise.all([
fetchFavoriteProblems(),
fetchUsers(),
]);
return (
<div className="container mx-auto... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/favorites/table.tsx | TypeScript (TSX) | "use client";
import {
flexRender,
getCoreRowModel,
getPaginationRowModel,
getSortedRowModel,
useReactTable,
} from "@tanstack/react-table";
import { User } from "@prisma/client";
import { FavoriteProblem } from "@/types/problem";
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
Tab... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/favorites/user-select.tsx | TypeScript (TSX) | import { cn } from "@/lib/utils";
import { Check, X, ChevronsUpDown } from "lucide-react";
import { Button } from "@/components/ui/button";
import {
Command,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
} from "@/components/ui/command";
import {
Popover,
PopoverContent,
PopoverTrigger,
} from... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/favorites/utils.tsx | TypeScript (TSX) | import { buttonVariants } from "@/components/ui/button";
import ColumnHeader from "@/components/ui/table/column-header";
import { cn } from "@/lib/utils";
import Link from "next/link";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { SCORE } from "@/lib/constants/score";
import { C... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/globals.css | CSS | @tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 240 10% 3.9%;
--card: 0 0% 100%;
--card-foreground: 240 10% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 240 10% 3.9%;
--primary: 240 5.9% 10%;
--primary-foregro... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/layout.tsx | TypeScript (TSX) | import type { Metadata } from "next";
import { Inter, Style_Script } from "next/font/google";
import "./globals.css";
import { ThemeProvider } from "@/components/theme/theme-provider";
import ThemeSwitcher from "@/components/theme/theme-switcher";
import { cn } from "@/lib/utils";
import NavBar from "./navbar";
// Imp... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/navbar.tsx | TypeScript (TSX) | "use client";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import Link from "next/link";
import { useSelectedLayoutSegment } from "next/navigation";
const NavBar = () => {
const segment = useSelectedLayoutSegment() ?? "";
const navlinks = [
{
isActive: !["favorites... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
app/page.tsx | TypeScript (TSX) | import { redirect } from "next/navigation";
import { fetchUsers } from "./actions/users";
const HomePage = async () => {
const users = await fetchUsers();
redirect(`/${users[0].username}`);
};
export default HomePage;
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/theme/theme-provider.tsx | TypeScript (TSX) | "use client";
import React from "react";
import { ThemeProvider as NextThemesProvider } from "next-themes";
export function ThemeProvider({
children,
...props
}: React.ComponentProps<typeof NextThemesProvider>) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>;
}
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/theme/theme-switcher.tsx | TypeScript (TSX) | "use client";
import React from "react";
import { Moon, Sun } from "lucide-react";
import { useTheme } from "next-themes";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
const ThemeSwi... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/avatar.tsx | TypeScript (TSX) | "use client";
import React from "react";
import * as AvatarPrimitive from "@radix-ui/react-avatar";
import { cn } from "@/lib/utils";
const Avatar = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
>(({ className, ...props }, ref) => (
... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/badge.tsx | TypeScript (TSX) | import * as React from "react";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
const badgeVariants = cva(
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/button.tsx | TypeScript (TSX) | import React from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
import { Loader } from "lucide-react";
const buttonVariants = cva(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md ... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/card.tsx | TypeScript (TSX) | import * as React from "react";
import { cn } from "@/lib/utils";
const Card = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
<div
ref={ref}
className={cn(
"rounded-xl border bg-card text-card-foreground shadow",
className,
)}... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/chart.tsx | TypeScript (TSX) | "use client";
import * as React from "react";
import * as RechartsPrimitive from "recharts";
import { cn } from "@/lib/utils";
// Format: { THEME_NAME: CSS_SELECTOR }
const THEMES = { light: "", dark: ".dark" } as const;
export type ChartConfig = {
[k in string]: {
label?: React.ReactNode;
icon?: React.Co... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/combobox.tsx | TypeScript (TSX) | "use client";
import * as React from "react";
import { Check, ChevronsUpDown } from "lucide-react";
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
import {
Command,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
} from "@/components/ui/command";
imp... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/command.tsx | TypeScript (TSX) | "use client";
import * as React from "react";
import { type DialogProps } from "@radix-ui/react-dialog";
import { Command as CommandPrimitive } from "cmdk";
import { Search } from "lucide-react";
import { cn } from "@/lib/utils";
import { Dialog, DialogContent } from "@/components/ui/dialog";
const Command = React.f... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/dialog.tsx | TypeScript (TSX) | "use client";
import * as React from "react";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "lucide-react";
import { cn } from "@/lib/utils";
const Dialog = DialogPrimitive.Root;
const DialogTrigger = DialogPrimitive.Trigger;
const DialogPortal = DialogPrimitive.Portal;
const Dialog... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/dropdown-menu.tsx | TypeScript (TSX) | "use client";
import React from "react";
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
import { Check, ChevronRight, Circle } from "lucide-react";
import { cn } from "@/lib/utils";
const DropdownMenu = DropdownMenuPrimitive.Root;
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/popover.tsx | TypeScript (TSX) | "use client";
import * as React from "react";
import * as PopoverPrimitive from "@radix-ui/react-popover";
import { cn } from "@/lib/utils";
const Popover = PopoverPrimitive.Root;
const PopoverTrigger = PopoverPrimitive.Trigger;
const PopoverAnchor = PopoverPrimitive.Anchor;
const PopoverContent = React.forwardRe... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/select.tsx | TypeScript (TSX) | "use client";
import * as React from "react";
import * as SelectPrimitive from "@radix-ui/react-select";
import { Check, ChevronDown, ChevronUp } from "lucide-react";
import { cn } from "@/lib/utils";
const Select = SelectPrimitive.Root;
const SelectGroup = SelectPrimitive.Group;
const SelectValue = SelectPrimitiv... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/table/column-header.tsx | TypeScript (TSX) | import { Column } from "@tanstack/react-table";
import { ArrowDown, ArrowUp, ChevronsUpDown, EyeOff } from "lucide-react";
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigge... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/table/column-toggle.tsx | TypeScript (TSX) | "use client";
import { DropdownMenuTrigger } from "@radix-ui/react-dropdown-menu";
import { Table } from "@tanstack/react-table";
import { Settings2 } from "lucide-react";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
DropdownMenuCheckboxItem,
DropdownMenuContent,
DropdownMenuLabel,
... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/table/index.tsx | TypeScript (TSX) | import React from "react";
import { cn } from "@/lib/utils";
const Table = React.forwardRef<
HTMLTableElement,
React.HTMLAttributes<HTMLTableElement>
>(({ className, ...props }, ref) => (
<div className="relative w-full overflow-auto">
<table
ref={ref}
className={cn("w-full caption-bottom text-s... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/table/pagination.tsx | TypeScript (TSX) | import { Table } from "@tanstack/react-table";
import {
ChevronLeft,
ChevronRight,
ChevronsLeft,
ChevronsRight,
} from "lucide-react";
import { Button } from "@/components/ui/button";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
interface P... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
components/ui/tooltip.tsx | TypeScript (TSX) | "use client";
import * as React from "react";
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
import { cn } from "@/lib/utils";
const TooltipProvider = TooltipPrimitive.Provider;
const Tooltip = TooltipPrimitive.Root;
const TooltipTrigger = TooltipPrimitive.Trigger;
const TooltipContent = React.forwa... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
eslint.config.mjs | JavaScript | import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
import nextTypescript from "eslint-config-next/typescript";
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirnam... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
init-db.sql | SQL | CREATE DATABASE "leetify"; | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
lib/constants/score.ts | TypeScript | export const SCORE: { easy: number; medium: number; hard: number } = {
easy: 1,
medium: 5,
hard: 10,
};
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
lib/prisma.ts | TypeScript | import { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient();
export default prisma;
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
lib/utils.ts | TypeScript | import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
// Global overrides
Date.prototype.withoutTime = function () {
const date = new Date(this);
date.setHours(0, 0, 0, 0);
return date;
};
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
next.config.ts | TypeScript | import type { NextConfig } from "next";
const nextConfig: NextConfig = {};
export default nextConfig;
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
postcss.config.mjs | JavaScript | /** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};
export default config;
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
prisma/migrations/20250119121312_initial_migration/migration.sql | SQL | -- CreateTable
CREATE TABLE "problems" (
"id" TEXT NOT NULL,
"isFavorite" BOOLEAN NOT NULL DEFAULT false,
"title" TEXT NOT NULL,
"difficulty" TEXT NOT NULL,
"url" TEXT NOT NULL,
"userId" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "problems_pke... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
prisma/migrations/20250119192532_add_submitted_at_to_problems/migration.sql | SQL | /*
Warnings:
- Added the required column `submittedAt` to the `problems` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "problems" ADD COLUMN "submittedAt" TIMESTAMP(3) NOT NULL;
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
prisma/migrations/20250120144639_update_avatar_to_nullable/migration.sql | SQL | -- AlterTable
ALTER TABLE "users" ALTER COLUMN "avatar" DROP NOT NULL;
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
prisma/migrations/20250130144546_rename_leetcodeusername_to_username_and_add_a_unique_constraint/migration.sql | SQL | /*
Warnings:
- You are about to drop the column `leetCodeUserName` on the `users` table. All the data in the column will be lost.
- A unique constraint covering the columns `[username]` on the table `users` will be added. If there are existing duplicate values, this will fail.
- Added the required column `user... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
prisma/migrations/20250226052132_add_topics/migration.sql | SQL | -- CreateTable
CREATE TABLE "topics" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"slug" TEXT NOT NULL,
CONSTRAINT "topics_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "_ProblemToTopic" (
"A" TEXT NOT NULL,
"B" TEXT NOT NULL,
CONSTRAINT "_ProblemToTopic_AB_pkey" PRIMARY KEY ("A"... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
tailwind.config.ts | TypeScript | import type { Config } from "tailwindcss";
export default {
darkMode: ["class"],
content: [
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}",
],
// eslint-disable-next-line @typescript-eslint/no-require-imports
plugins: [require("tailwi... | AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
types/analytics.ts | TypeScript | export type ScoreProgression = Record<string, string | number>;
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
types/globals.d.ts | TypeScript | interface Date {
withoutTime: () => Date;
}
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
types/problem.ts | TypeScript | import { Problem, Topic, User } from "@prisma/client";
export type FavoriteProblem = Problem & { users: User[]; topics: Topic[] };
export type ProblemWithTopics = Problem & { topics: Topic[] };
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
types/user.ts | TypeScript | import { User } from "@prisma/client";
export type UserRanked = User & {
score: number;
rank: number;
};
| AbhayVAshokan/leetify | 1 | Gamify LeetCode | TypeScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
seed.sh | Shell | #!/bin/bash
echo "⣯ Installing dependencies"
apt-get update;
apt-get install jq -y;
echo "⣯ Starting to seed features from JSON"
cat /features.json | jq -c '.feature_flags[]' | while read -r feature; do
name=$(echo "$feature" | jq -r '.name')
description=$(echo "$feature" | jq -r '.description // ""' | sed "... | AbhayVAshokan/unleash-docker | 0 | Docker Compose setup for running an Unleash feature flagging instance with pre-seeded feature flags. | Shell | AbhayVAshokan | Abhay V Ashokan | gitlab |
src/content/actions.js | JavaScript | import { getActiveElement, focusFirstVisibleElement } from "./dom";
export const getVoteButton = (activeElement, voteType) => {
if (activeElement.tagName === "ARTICLE") {
return activeElement
.querySelector("shreddit-post")
.shadowRoot.querySelector(`button[${voteType}]`);
} else if (activeElement.... | AbhayVAshokan/vimmit | 0 | Vim-like keyboard navigation for Reddit. Browse posts and comments with 'j' and 'k', upvote/downvote with 'u'/'d', and more. | JavaScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
src/content/dom.js | JavaScript | import { isVisible } from "./utils";
export const FOCUSSED_CLASSNAME = "vimmit-card__focussed";
export const focusElement = (element) => {
if (!element) return;
document
.querySelectorAll(`.${FOCUSSED_CLASSNAME}`)
.forEach((element) => element.classList.remove(FOCUSSED_CLASSNAME));
element.classList.a... | AbhayVAshokan/vimmit | 0 | Vim-like keyboard navigation for Reddit. Browse posts and comments with 'j' and 'k', upvote/downvote with 'u'/'d', and more. | JavaScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
src/content/index.js | JavaScript | import { disableKeybindings } from "./utils";
import {
gotoNextPostOrComment,
gotoPrevPostOrComment,
selectPost,
gotoNewPost,
gotoHome,
gotoPopularTab,
} from "./navigation";
import { handleUpvote, handleDownvote, addComment } from "./actions";
const KEYBINDINGS = {
j: gotoNextPostOrComment,
k: gotoPre... | AbhayVAshokan/vimmit | 0 | Vim-like keyboard navigation for Reddit. Browse posts and comments with 'j' and 'k', upvote/downvote with 'u'/'d', and more. | JavaScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
src/content/navigation.js | JavaScript | import { getActiveElement, getPostsAndComments, focusElement, focusFirstVisibleElement } from "./dom";
export const gotoNextPostOrComment = () => {
const posts = getPostsAndComments();
if (posts.length === 0) return;
const activeElement = getActiveElement();
if (activeElement) {
const currentIndex = posts... | AbhayVAshokan/vimmit | 0 | Vim-like keyboard navigation for Reddit. Browse posts and comments with 'j' and 'k', upvote/downvote with 'u'/'d', and more. | JavaScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
src/content/styles.css | CSS | :root {
--vimmit-color-primary: #1da1f2;
--vimmit-card-focused-bg: rgba(29, 161, 242, 0.05);
}
html.theme-dark {
--vimmit-color-primary: #e1e8ed;
--vimmit-card-focused-bg: rgba(225, 232, 237, 0.05);
}
.vimmit-card__focussed {
outline: 2px solid var(--vimmit-color-primary) !important;
border-radius: 0.2rem... | AbhayVAshokan/vimmit | 0 | Vim-like keyboard navigation for Reddit. Browse posts and comments with 'j' and 'k', upvote/downvote with 'u'/'d', and more. | JavaScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
src/content/utils.js | JavaScript | export const isVisible = (element) => {
if (!element) return false;
const rect = element.getBoundingClientRect();
return (
(rect.top >= 0 && rect.bottom <= window.innerHeight) ||
(rect.top >= 0 && rect.bottom <= window.innerHeight)
);
};
export const disableKeybindings = () => {
const activeElement =... | AbhayVAshokan/vimmit | 0 | Vim-like keyboard navigation for Reddit. Browse posts and comments with 'j' and 'k', upvote/downvote with 'u'/'d', and more. | JavaScript | AbhayVAshokan | Abhay V Ashokan | gitlab |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.