Skip to content

Instantly share code, notes, and snippets.

View Philipinho's full-sized avatar
🎯
Focusing on Java

Philip Okugbe Philipinho

🎯
Focusing on Java
View GitHub Profile
@hackermondev
hackermondev / zendesk.md
Last active November 16, 2024 12:28
1 bug, $50,000+ in bounties, how Zendesk intentionally left a backdoor in hundreds of Fortune 500 companies

hi, i'm daniel. i'm a 15-year-old with some programming experience and i do a little bug hunting in my free time. here's the insane story of how I found a single bug that affected over half of all Fortune 500 companies:

say hello to zendesk

If you've spent some time online, you’ve probably come across Zendesk.

Zendesk is a customer service tool used by some of the world’s top companies. It’s easy to set up: you link it to your company’s support email (like [email protected]), and Zendesk starts managing incoming emails and creating tickets. You can handle these tickets yourself or have a support team do it for you. Zendesk is a billion-dollar company, trusted by big names like Cloudflare.

Personally, I’ve always found it surprising that these massive companies, worth billions, rely on third-party tools like Zendesk instead of building their own in-house ticketing systems.

your weakest link

/* File generated automatically, do not edit. */
import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely';
export type DBEventType =
'goal' |
'own-goal' |
'penalty-goal' |
'penalty-miss' |
'yellow-card' |
@ajayvignesh01
ajayvignesh01 / Tweet.tsx
Created February 24, 2024 06:03
A Tiptap extension to embed Tweets
import { NodeViewProps, NodeViewWrapper } from '@tiptap/react'
import { nodePasteRule, ReactNodeViewRenderer } from '@tiptap/react'
import { mergeAttributes, Node } from '@tiptap/core'
import { Tweet } from 'react-tweet'
export const TweetComponent = ({ node }: NodeViewProps) => {
const url = node.attrs.url
const tweetIdRegex = /\/status\/(\d+)/g
const id = tweetIdRegex.exec(url)?.[1]
@gragland
gragland / use-optimistic-mutation-example.ts
Last active July 1, 2024 07:39
useOptimisticMutation for React Query. Optimistically update data in multiple locations with rollback on error.
import axios from 'axios'
import { useOptimisticMutation } from "./useOptimisticMutation.ts"
type Response = boolean
type Error = unknown
type MutationVariables = {itemId: string}
type Items = {id: string; name: string}[]
type Likes = {itemId: string}[]
type History = {type: string}[]
@ryanto
ryanto / page.tsx
Created August 9, 2023 17:01
<Await> component
import { Markdown } from "@/app/components/markdown";
import { getComments, getPost } from "@/lib/db";
import { Suspense } from "react";
export default async function PostPage({
params,
}: {
params: { postId: string };
}) {
let post = await getPost(params.postId);
@YPetremann
YPetremann / prisma-auto-excluder.js
Last active September 10, 2023 14:57
Prisma Auto Exclude
const { Prisma } = require("@prisma/client");
/**
* this plugin is used to automatically exclude fields from prisma queries
* this works with almost all prisma queries that use select and include
* if a custom query is used, it will not work by default,
* but it can by adding a $autoExclude:true to the args
* next to select and include, there is now exclude
* if a field ends with an underscore, it will be excluded unless explicitly in select or include
* truthy field in exclude will be excluded, even if present in select or include
@tommmyngo
tommmyngo / radix.css
Last active April 28, 2024 06:48
Radix Colors
:root {
--background: var(--gray1);
--foreground: var(--gray12);
--muted: var(--gray3);
--muted-foreground: var(--gray10);
--popover: var(--gray2);
--popover-foreground: var(--gray11);
@Venryx
Venryx / Fractional Indexing (David Greenspan).md
Last active July 23, 2024 04:30
List of various fractional-indexing schemes, along with language-specific implementations
@ssddanbrown
ssddanbrown / bookstack-backup.sh
Last active October 30, 2024 15:51
bookstack-backup
#!/bin/bash
# Directory to store backups within
# Should not end with a slash and not be stored within
# the BookStack directory
BACKUP_ROOT_DIR="$HOME"
# Directory of the BookStack install
# Should not end with a slash.
BOOKSTACK_DIR="/var/www/bookstack"