Skip to content

Instantly share code, notes, and snippets.

View pbteja1998's full-sized avatar

Bhanu Teja Pachipulusu pbteja1998

View GitHub Profile
@pbteja1998
pbteja1998 / middleware.ts
Created April 8, 2023 15:15 — forked from perkinsjr/middleware.ts
Using Clerk with Upstash for Middleware rate limiting and API Protection
import { getAuth, withClerkMiddleware } from "@clerk/nextjs/server";
import { NextResponse, NextFetchEvent } from "next/server";
import type { NextRequest } from "next/server";
import { Ratelimit } from "@upstash/ratelimit";
import { Redis } from "@upstash/redis";
const publicPaths = ["/", "/sign-in*", "/sign-up*", "/api/blocked"];
const ratelimit = new Ratelimit({
redis: Redis.fromEnv(),

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@pbteja1998
pbteja1998 / mission_control_ext_bkp.json
Last active May 25, 2021 04:44
Mission Control Chrome Extension Backup Data
{
"sites": [
{
"cid": "d925ac3ddb957d38a3e68612",
"date": 1617986416631,
"id": 1,
"label": "Top Sites",
"starred": false,
"websites": [
{
@pbteja1998
pbteja1998 / old_mission_control_ext_bkp.json
Last active April 9, 2021 16:41
Mission Control Chrome Extension Backup Data
{
"sites": [
{
"cid": "f481aaa1a1d07ca7abb553a2",
"date": 1616984446830,
"id": 1,
"label": "Frequently Used Sites",
"starred": false,
"websites": [
{
@pbteja1998
pbteja1998 / README.md
Created December 17, 2020 14:19 — forked from MichaelCurrin/README.md
GitHub GraphQL - Get files in a repository

Get GitHub Files

Get the metadata and content of all files in a selected GitHub repo, using GraphQL

You might want to get a tree summary of files in a repo without downloading the repo, or maybe you want to lookup the contents of a file again without download the whole repo.

The approach here is to query data from GitHub using the Github V4 GraphQL API.

About the query

# Title of Your Project [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20this%20cool%20project&url=https://github.com/Cool/Project&hashtags=project,opensource)
![Github License](https://img.shields.io/badge/license-MIT-green)
![Code Coverage](https://img.shields.io/badge/coverage-90%25-green)
![React Version](https://img.shields.io/badge/react-v16.12.0-blue.svg)
![example](https://mdn.mozillademos.org/files/10529/inspector.png)
#### Description of your project
@pbteja1998
pbteja1998 / ux-ui.md
Last active October 20, 2020 11:10 — forked from duttakapil/ux-ui.md
UI and UX Curriculum

User-Centric Design Research

  • Qualitative and Quantitative Research Practices
  • Information Architecture and Flow
  • User Need Identification
  • User Experience Interviewing
  • Proto-Personas
  • Insight Synthesis

Visual Prototyping and Wireframing

  • Adobe Photoshop
@pbteja1998
pbteja1998 / generate-shadow-outline.tailwind.config.js
Last active September 30, 2020 11:59
This will generate `shadow-outline-*` utilities for all the colors (including your own custom-defined colors).
const colors = require('@tailwindcss/ui/colors')
module.exports = {
// ...
theme: {
// ...
extend: {
// ...
colors: {
brand: colors.indigo,
@pbteja1998
pbteja1998 / Python_sax_template.py
Created August 22, 2018 09:08 — forked from veryhappythings/Python_sax_template.py
As basic as a python SAX parser can get.
import sys, string
from xml.sax import saxutils, handler, make_parser
class ContentGenerator(handler.ContentHandler):
def __init__(self, out = sys.stdout):
handler.ContentHandler.__init__(self)
@pbteja1998
pbteja1998 / sidekiq_delete_jobs.md
Created July 3, 2018 11:44 — forked from eparreno/sidekiq_delete_jobs.md
How to delete Sidekiq jobs in a Rails app using ActiveJobs

How to delete Sidekiq jobs in a Rails app using ActiveJobs

Sidekiq jobs can be enqueued or scheduled. Enqueued means that they are gonna be picked up as soon as possible, scheduled jobs will be enqueued at some specific time.

job_id and jid

When using ActiveJobs, Rails will return a job_id after sending the job to ActiveJobs

job = UserMailer.send_invite(params).deliver_later