Skip to content

Instantly share code, notes, and snippets.

View sohang3112's full-sized avatar
:octocat:

Sohang Chopra sohang3112

:octocat:
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

@wiseaidev
wiseaidev / install_ipc_proxy_kernel.py
Last active June 16, 2024 08:33 — forked from SpencerPark/install_ipc_proxy_kernel.py
A little proxy kernel (and installer) that manages a wrapped kernel connected with tcp. It was designed to support the case where the server starts kernels with ipc transport but only tcp is supported (like Rust).
import argparse
import json
import os
import os.path
import shutil
import sys
from jupyter_client.kernelspec import (KernelSpec, KernelSpecManager,
NoSuchKernel)
@hwayne
hwayne / rainbow-sort.js
Created December 4, 2023 17:54
Rainbow sort
// put in https://editor.p5js.org/
// generated (mostly) with GPT4
let cols, rows;
let w = 2;
let colors = [];
let i = 0;
let j = 0;
let sorted = false;
@hirrolot
hirrolot / CoC.ml
Last active November 13, 2024 04:32
How to implement dependent types in 80 lines of code
type term =
| Lam of (term -> term)
| Pi of term * (term -> term)
| Appl of term * term
| Ann of term * term
| FreeVar of int
| Star
| Box
let unfurl lvl f = f (FreeVar lvl)
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
public class MyDictionary<T, V>: Dictionary<(string, T), V>
{
private IEnumerable<(string Name, T Value)> GetMembers(object obj)
{
var properties = obj.GetType().GetProperties(BindingFlags.Public).Select(o => (o.Name, Value: (T)o.GetValue(obj)));
@mufidu
mufidu / download_imgs.py
Last active November 1, 2024 07:00
Download all images in markdown files and rename the links to point to the local files. Moved to https://github.com/mufidu/markdown-image-downloader to allow for easier maintenance and contributions, if any.
import os
import urllib.parse
import urllib.request
import re
import time
import socket
from pathlib import Path
from typing import List, Tuple, Dict
from concurrent.futures import ThreadPoolExecutor, as_completed
from tqdm import tqdm
@ShrykeWindgrace
ShrykeWindgrace / _stack.ps1
Created April 22, 2022 08:16
Powershell tab-completion script for stack
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
Register-ArgumentCompleter -Native -CommandName 'stack' -ScriptBlock {
param($wordToComplete, $commandAst)
[string[]]$localCommand = @('"--bash-completion-enriched"')
$hay = [System.Collections.Generic.List[string]]::new()
foreach ($item in $commandAst.CommandElements) {
$localCommand += '"--bash-completion-word"'
$localCommand += """$item"""
$hay.Add($item.ToString())
@Widdershin
Widdershin / ssr.md
Last active May 1, 2024 17:36
The absurd complexity of server-side rendering

In the olden days, HTML was prepared by the server, and JavaScript was little more than a garnish, considered by some to have a soapy taste.

After a fashion, it was decided that sometimes our HTML is best rendered by JavaScript, running in a user's browser. While some would decry this new-found intimacy, the age of interactivity had begun.

But all was not right in the world. Somewhere along the way, we had slipped. Our pages went uncrawled by Bing, time to first meaningful paint grew faster than npm, and it became clear: something must be done.

And so it was decided that the applications first forged for the browser would also run on the server. We would render our HTML using the same logic on the server and the browser, and reap the advantages of both worlds. In a confusing series of events a name for this approach was agreed upon: Server-side rendering. What could go wrong?

In dark rooms, in hushed tones, we speak of colours.

@didibus
didibus / clojure-right-tool.md
Last active October 24, 2024 09:00
When is Clojure "the right tool for the job"?

My answer to: https://www.reddit.com/r/Clojure/comments/pcwypb/us_engineers_love_to_say_the_right_tool_for_the/ which asked to know when and at what is Clojure "the right tool for the job"?

My take is that in general, the right tool for the job actually doesn't matter that much when it comes to programming language.

There are only a few cases where the options of tools that can do a sufficiently good job at the task become limited.

That's why they are called: General-purpose programming languages, because they can be used generally for most use cases without issues.

Let's look at some of the dimensions that make a difference and what I think of Clojure for them: