Skip to content

Instantly share code, notes, and snippets.

View waptik's full-sized avatar
💻
Learning JavaScript and ReactJS...

TheVirginBrokey waptik

💻
Learning JavaScript and ReactJS...
View GitHub Profile
@washopilot
washopilot / steps.md
Created April 23, 2025 20:50
Update pnpm via corepack

To update pnpm via corepack (especially when using nvm and Node 22), you can follow these steps:


✅ Step-by-Step: Update pnpm via corepack

  1. Enable corepack (you probably already did this):
    corepack enable
@aravindanve
aravindanve / bypass-disable-devtool.md
Last active August 4, 2025 03:31
Bypass disable-devtool

(Working as of 2025-02-09)

There are websites that use disable-devtool to prevent you from opening or using devtools. They typically prevent you from right clicking or using the keyboard shortcut to open devtools. Even if you successfully do so, they detect it and redirect you elsewhere. You can bypass this by using one of the following ways.

Opening devtools

If the shortcut F12 on Windows or Option + ⌘ + I on Mac do not work. Press the three vertically aligned dots in the top right corner of your Google Chrome or Microsoft Edge window. Under the section "More Tools", you'll see the option to select "Developer Tools" which opens the toolkit in your window.

@dsdanielpark
dsdanielpark / Ubuntu+Nginx+SSL(acme.sh)+CloudflareDNS+Flask.md
Last active July 27, 2025 03:52
Ubuntu 22.04 + Nginx + SSL (acme.sh) + Cloudflare DNS Setup + Flask + tumx

Step-by-Step Guide to Setting Up SSL with Nginx on Ubuntu 22.04

This guide provides a detailed walkthrough on setting up SSL (Secure Sockets Layer) with Nginx using OpenSSL and acme.sh on Ubuntu 22.04. Each step is explained with key concepts and commands for a clear understanding.

Most errors occur due to incorrect paths. Know your path and create files and directories correctly before passing them as arguments.

@nimeshkasun
nimeshkasun / OpenAI-into-Spreadsheets.js
Last active December 27, 2023 22:48
This scripts allows to integrate OpenAI GPT-3 into Google Spreadsheets.
const SECRET_KEY = "ENTER YOUR SECRET KEY HERE TAKEN FROM OPEN_AI";
// Follow on LinkedIn: https://www.linkedin.com/in/nimeshkasun
/**
* Completes your prompt with GPT-3
*
* @param {string} prompt Your prompt for OpenAI
* @param {number} precision (Optional) Precision. 1 is super creative while 0 is very exact and precise. Defaults to 0.4.
* @param {string} model (Optional) GPT-3 Model to use. Defaults to "text-ada-001".
const SECRET_KEY = ENTER YOUR SECRET KEY HERE;
const MAX_TOKENS = 200;
// For more cool AI snippets and demos, follow me on Twitter: https://twitter.com/_abi_
/**
* Completes your prompt with GPT-3
*
* @param {string} prompt Prompt
* @param {number} temperature (Optional) Temperature. 1 is super creative while 0 is very exact and precise. Defaults to 0.4.
@Evavic44
Evavic44 / Buymeacoffee.md
Last active July 22, 2025 10:05
Buymeacoffee widget React
import React, { useEffect } from "react";

export default function Buymeacoffee() {
	useEffect(() => {
		const script = document.createElement("script");
		const div = document.getElementById("supportByBMC");
		script.setAttribute("data-name", "BMC-Widget");
		script.src = "https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js";
		script.setAttribute("data-id", "evavic44");
@lzjluzijie
lzjluzijie / how-to.md
Last active April 23, 2025 12:39
Access Private BackBlaze B2 Bucket from Cloudflare Transform Rules

Access Private BackBlaze B2 Bucket from Cloudflare Transform Rules

Original post from my Blog.

Cloudflare now offers free Transform Rules, so BackBlaze B2 users can use URL Rewrite rules to hide bucket name and provide access to private bucket.

TLDR: Create a URL Rewrite Rule and hide your bucket name. If your bucket is private, you also need to create a Cloudflare Worker, copy the code and fill in the config.

Hide Bucket Name

@timfish
timfish / README.md
Last active July 23, 2025 09:14
Sentry Cloudflare Workers Proxy - Makes JavaScript and event submission first-party!
  • Add the worker.js code to a new Cloudflare Worker
  • Set up a worker for your domain than responds to /tunnel/* and point it to your new worker
  • Add the Sentry script to your html but replace https://browser.sentry-cdn.com/ with ./tunnel/
    • Eg. <script src="./tunnel/6.9.0/bundle.min.js"></script>
  • init Sentry with the tunnel option set to /tunnel/
    • Eg. Sentry.init({ dsn: "__DSN__", tunnel: "/tunnel/" })
  • Rejoice at how everything now works with ad blockers
<?
//
// AUTO KEYWORD-BASED FOLLOWER CURATION BOT (by @levelsio)
//
// File: twitterFollowerCuratorBot.php
//
// Created: May 2021
// License: MIT
//
@steveruizok
steveruizok / getRelativeTransformedBoundingBox.ts
Last active June 20, 2021 17:07
Transform a rotated bounding box.
export function getRelativeTransformedBoundingBox(
bounds: Bounds,
initialBounds: Bounds,
initialShapeBounds: Bounds,
isFlippedX: boolean,
isFlippedY: boolean
) {
const minX =
bounds.minX +