Skip to content

Instantly share code, notes, and snippets.

View zisra's full-sized avatar
🪨
Kicking rocks

zisra

🪨
Kicking rocks
View GitHub Profile
@bdsqqq
bdsqqq / vesper-dark.json
Last active August 20, 2024 22:07
Vesper theme for zed.dev
{
"$schema": "https://zed.dev/schema/themes/v0.1.0.json",
"name": "Vesper",
"author": "Rauno Freiberg",
"themes": [
{
"name": "Vesper",
"appearance": "dark",
"style": {
"border": "#101010",
@rishi-raj-jain
rishi-raj-jain / index.ts
Last active September 4, 2024 05:26
Google OAuth 2.0 on the Edge with Hono and Cloudflare Workers
// Do enable nodejs_compat
// https://developers.cloudflare.com/workers/runtime-apis/nodejs/
import crypto from 'node:crypto'
import { Context, Hono } from 'hono'
const app = new Hono()
function generateJWT(payload, secret, expiresIn) {
const header = { alg: 'HS256', typ: 'JWT' }
const encodedHeader = base64UrlEncode(JSON.stringify(header))
@theatom06
theatom06 / README.md
Last active September 18, 2023 05:33
Naming Scheme in Js

Gandalf's JavaScript Naming Scheme

1. CamelCase:

  • Use camel case for variable and function names.
  • Example: myVariable, myFunction

2. PascalCase:

  • Use Pascal case for class and constructor names and modubles.
  • Example: MyClass, MyConstructor, MyModule
@b-nnett
b-nnett / boost.js
Created April 18, 2023 15:47
Arc ChatGPT Boost
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function fillQuery() {
question = window.location.search.split("=")[1].replace("+", " ").replace("%3F", "?").replace("%27", "'")
var input = document.getElementsByTagName("textarea")[0]
await sleep(1000); // Pause for 1 second
input.textContent = question
// input.innerText = question
@hackermondev
hackermondev / ClydeAI-Jailbreak.md
Last active June 16, 2024 08:41
Discord ClydeAI jailbreak
@zisra
zisra / index.js
Last active March 21, 2023 23:40
Parse date
import parseDate from './parseDate.js';
parseDate('1 minute'); // => 60000
parseDate('1 hour'); // => 3600000
parseDate('Not a date'); // => Error: Invalid format
/*
* Usage: count {unit}
* Units:
* s, second, seconds, sec
@monokee
monokee / define-component.js
Last active May 28, 2024 13:03
Tiny customElement wrapper that enables scalable web component architecture. Define custom elements with a configuration object that separates markup from css and javascript. Uses a slotted light DOM (no shadow DOM) to allow for powerful component extension, composition and easier styling with external stylesheets and global css variables. Expor…
/**
* Tiny customElement wrapper that enables scalable web component architecture.
* Define custom elements with a configuration object that separates markup from css and javascript.
* Uses a slotted light DOM (no shadow DOM) to allow for powerful component extension,
* composition and easier styling with external stylesheets and global css variables.
* Exports a component class that can be imported and explicitly used to be picked up by module bundlers.
* See comments for examples and GNU license below.
*/
export function defineComponent(name, config) {
@oSumAtrIX
oSumAtrIX / README.md
Last active August 22, 2024 18:55
Useful snippets for Discord

Discord console scripts

My collection of scripts for Discord.

Scripts

  • friend_invitelink.js: Generate a friend invite link
  • clientside_nitro.js: Spoof the client and enable client side Discord Nitro
@ExampleWasTaken
ExampleWasTaken / discord_webpack_code_snippets.md
Last active February 22, 2024 18:03
Enable Discord Developer Options and more

DISCLAIMER

I am in no way, shape, or form responsible for any damage caused by the usage of these snippets. You use them at your own risk! I am not related to Discord in any way.

This gist is unmaintained! Feel free to fork it.

What is this?

Using the Chrome dev tools you can do some fun stuff with the Discord client. As they are disabled on the stable version you need to use the canary version which is used to test new features before they get released to the stable version. It's usage is totally legal and within ToS. Discord does not promote it but encourages users to use it to find bugs, etc.

You can download the latest Canary builds here: