Skip to content

Instantly share code, notes, and snippets.

@kingingcole
kingingcole / gist:28d7b39e538f36e6630e425bc7af8cac
Created October 5, 2024 14:21
Terminal command to delete all merged local branches
git branch --merged | grep -v "^\*\\|main" | xargs -n 1 git branch -d
@kingingcole
kingingcole / menu.tsx
Last active June 28, 2023 08:15 — forked from bnorton/menu.jsx
Chameleon Technical exercise - Frontend Engineer
/*
Dropdown Component
The Dropdown component is a reusable React component that renders a dropdown menu with customizable items. It supports a main menu and an optional "More items" section for additional menu items.
Usage
Install the required dependencies.
Import the Dropdown component into your React application.
Use the Dropdown component in your JSX code, providing the necessary props.
@kingingcole
kingingcole / bypass.js
Created October 21, 2022 01:23
Bypass Google reCaptcha Example
var reCaptcha = document.querySelector('.g-recaptcha');
var sitekey = reCaptcha.dataset.sitekey;
var API_KEY = <YOUR_2CAPTCHA_API_KEY>;
var byPassUrl = `https://2captcha.com/in.php?key=${API_KEY}&method=userrecaptcha&googlekey=${sitekey}&pageurl=https://www.google.com/recaptcha/api2/demo&json=1`;
fetch(byPassUrl).then(res => res.json()).then(res => {
// initiate bypass request
requestID = res.request;