Skip to content

Instantly share code, notes, and snippets.

const authToken = ''; // Replace with your actual authorization token prefixed by 'Bearer '
function delay(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function fetchAndProcessItems(offset) {
const apiUrl = `https://chat.openai.com/backend-api/conversations?offset=${offset}&limit=28&order=updated`;
try {
@abstraction
abstraction / discord_app_protocols.md
Created August 28, 2023 19:41 — forked from ghostrider-05/discord_app_protocols.md
An unofficial list of discord app protocols

Discord app protocols

Home:

  • /: discord://-/
  • friends: discord://-/channels/@me/
  • nitro: discord://-/store
  • message requests: discord://-/message-requests

General:

@abstraction
abstraction / normcore-llm.md
Created August 27, 2023 16:56 — forked from veekaybee/normcore-llm.md
Normcore LLM Reads
@abstraction
abstraction / clean-bookmark-cleaner.js
Created March 4, 2023 10:59
using Bookmark Cleaner extension to remove ever dup except the first
{const dups = document.querySelectorAll('.row');
dups.forEach((dup) => {
const count = dup.querySelectorAll('input').length;
for(let i = 0; i < count; i++) {
dup.querySelectorAll('input')[i].click();
}
})}
@abstraction
abstraction / gpay-to-csv.js
Last active March 4, 2023 12:51
Google Pay HTML Export to CSV
{
let output = "";
const seperator = ",";
let nn = 0;
document
.querySelectorAll(".outer-cell > .mdl-grid > div:nth-child(2)")
.forEach((transaction) => {
const lll = transaction.parentElement
.querySelector(".mdl-typography--caption")
.innerHTML.search(/(Cancelled|Failed|Pending)/);
@abstraction
abstraction / amazon-product-price-avg-med.js
Last active March 4, 2023 11:07
Find Amazon's product search resullts page's price average
{
/**
* Paste the script in console to find the average of first 20 Amazon search results
*/
const adProductPrices = [];
const organicProductPrices = [];
// Median from: https://www.w3resource.com/javascript-exercises/fundamental/javascript-fundamental-exercise-88.php
const median = (arr) => {
const mid = Math.floor(arr.length / 2),
@abstraction
abstraction / make-my-trip-datepicker-average.js
Created June 15, 2022 00:08
Get monthly average ticket price
/*
* Open MMT website datepicker UI
* https://makemytrip.com
* The script below will output the avergae of the date picker month on the left side
*/
{
const all = document.querySelectorAll(
"div.DayPicker-Month:nth-child(1) > div:nth-child(3) div.dateInnerCell p.todayPrice"
);
@abstraction
abstraction / mpv-commands.lua
Created May 1, 2022 19:58 — forked from DrLulz/mpv-commands.lua
MPV zoom, rotate, and pan. Add to mpv scripts folder.
-- ZOOM
function zoom_in()
zoom = mp.get_property("video-zoom")
zoom_to = zoom + 0.1
mp.set_property("video-zoom", zoom_to)
end
function zoom_out()
zoom = mp.get_property("video-zoom")
zoom_to = zoom - 0.1
mp.set_property("video-zoom", zoom_to)

For Windows 10, change these keys in regedit:

  • Computer\HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\edit\command
  • Computer\HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\open\command
  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\edit\command
  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\edit\command

From: %SystemRoot%\system32\NOTEPAD.EXE %1 To: "%ProgramFiles%\Sublime Text 3\sublime_text.exe" "%1" Or: "%ProgramFiles%{insert-path-to-fave-editor}" "%1"

@abstraction
abstraction / apple-m1-macbook-air-macbook-pro-mini-developer-setup-guide-security.md
Created April 5, 2022 23:53
Security Hardened + Apple-Free M1 Macbook Air, Macbook Pro, and Mini Setup for Power Developers

Security Hardened + Apple-Free M1 Macbook Air, Macbook Pro, and Mini Setup for Power Developers

An opinionated configuration by @niftylettuce for Apple's M1 computer line-up.

Table of Contents

Foreword

I launched Forward Email in November and needed a faster machine to work with.