Skip to content

Instantly share code, notes, and snippets.

View ImBIOS's full-sized avatar
Working on something useful - stay tuned!

Imamuzzaki Abu Salam ImBIOS

Working on something useful - stay tuned!
View GitHub Profile
(
function() {
let div = '<div id="progress" style="position: fixed; z-index: 1000; background-color: #424c59; padding: 1em; bottom: 1em; left: 1em; border-radius: 4px; box-shadow: 1px 2px 12px 0 black">Clearing wishlist...</div>';
document.querySelector("body").innerHTML+=div;
let progress = document.getElementById("progress");
let promises = [], count = 0;
for (let id of g_Wishlist.rgAllApps) {
let form = new FormData();
form.append('sessionid', g_sessionID);
@ImBIOS
ImBIOS / Remove videos from Youtube Watch Later playlist.md
Created February 12, 2024 07:26 — forked from astamicu/Remove videos from Youtube Watch Later playlist.md
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@ImBIOS
ImBIOS / urlHelper.test.ts
Created September 23, 2023 10:17
Bun test for urlHelper custom react hook
import { renderHook } from '@testing-library/react'
import { describe, expect, it, spyOn } from 'bun:test'
import * as nextNavigation from 'next/navigation'
import { useUrlHelper } from '@/hooks/urlHelper'
const { ReadonlyURLSearchParams } = nextNavigation
// // Mock the Next.js hooks
// jest.mock('next/navigation', () => ({
@ImBIOS
ImBIOS / unlock_gpt_4.py
Created July 30, 2023 09:48
Script to unlock GPT-4 in OpenAI API
# Use pipenv to auto load OPENAI KEY
import sys
import time
import json
import signal
import openai
# Constants
TOKENS_PER_MINUTE = 90000 - 100 # 90000 tokens per minute - 100 for safety
REQUESTS_PER_MINUTE = 3500 - 100 # 3500 requests per minute - 100 for safety
This file has been truncated, but you can view the full file.
[{"traceId":"246038dbee31cf99","name":"hot-reloader","id":1,"timestamp":140675272083,"duration":23,"tags":{"version":"13.4.10-canary.8"},"startTime":1689309044022},{"traceId":"246038dbee31cf99","parentId":1,"name":"start","id":2,"timestamp":140675272654,"duration":1,"tags":{},"startTime":1689309044022},{"traceId":"246038dbee31cf99","parentId":2,"name":"get-version-info","id":3,"timestamp":140675273010,"duration":2010979,"tags":{},"startTime":1689309044023},{"traceId":"246038dbee31cf99","parentId":2,"name":"clean","id":4,"timestamp":140677284024,"duration":165,"tags":{},"startTime":1689309046034},{"traceId":"246038dbee31cf99","parentId":5,"name":"get-page-paths","id":6,"timestamp":140677286385,"duration":512,"tags":{},"startTime":1689309046036},{"traceId":"246038dbee31cf99","parentId":5,"name":"create-pages-mapping","id":7,"timestamp":140677286911,"duration":170,"tags":{},"startTime":1689309046037},{"traceId":"246038dbee31cf99","parentId":5,"name":"create-entrypoints","id":8,"timestamp":140677287090,"duration"
This file has been truncated, but you can view the full file.
{"nodes":[{"id":1,"callFrame":{"functionName":"(root)","scriptId":"0","url":"","lineNumber":-1,"columnNumber":-1},"hitCount":0,"children":[2,56,473,479,490,2158,2160,2162,2163,2175,2303,2319,2324,2331,2375,2381,2408,2424,2433,2436,2439,2449,3716,3762,3930,3932,3934,3938,4907,4990,5658,5913,6167,6673,6927,7181,10208,10966,13035,16492,18988,42258,43267,43275,43317,58962,58965,59056,59068,59207,59356,59419,59432,59433,59450,59574,59579,59659,60517,60564,71947,72029,72188,72310,72375,72379,72380,72382,72386,72407,72572,72575,72619,73476,93757,93799,93806,93809,93814,93826,93840,93953,94142,94363,94372,94376,94377,94378,94398,94402,95336,102806,102859,102897,102990,103003,108754,112052]},{"id":2,"callFrame":{"functionName":"processTicksAndRejections","scriptId":"39","url":"node:internal/process/task_queues","lineNumber":66,"columnNumber":34},"hitCount":7,"children":[3,477,489,515,526,2373,2451,2470,2820,4917,4932,58998,59014,59030,59053,71988,72096,93894,93915,102958],"positionTicks":[{"line":83,"ticks":2},{"line"
This file has been truncated, but you can view the full file.
{"nodes":[{"id":1,"callFrame":{"functionName":"(root)","scriptId":"0","url":"","lineNumber":-1,"columnNumber":-1},"hitCount":0,"children":[2,69,529,535,541,1945,1957,1961,2105,2126,2127,2133,2173,2179,2212,2247,2298,2540,2542,2548,2549,2565,2618,2648,2693,2765,2799,4397,4399,4400,4402,4423,4470,4471,4501,4699,4703,4706,4724]},{"id":2,"callFrame":{"functionName":"processTicksAndRejections","scriptId":"39","url":"node:internal/process/task_queues","lineNumber":66,"columnNumber":34},"hitCount":1,"children":[3,533,564,578,2226,2292,2558,2573,2593,2597,2779,4464],"positionTicks":[{"line":77,"ticks":1}]},{"id":3,"callFrame":{"functionName":"emit","scriptId":"453","url":"node:internal/child_process","lineNumber":934,"columnNumber":15},"hitCount":0,"children":[4]},{"id":4,"callFrame":{"functionName":"emit","scriptId":"29","url":"node:events","lineNumber":459,"columnNumber":43},"hitCount":0,"children":[5]},{"id":5,"callFrame":{"functionName":"messageListener","scriptId":"486","url":"file:///Users/it-gaadmin/itmi-id/te
This file has been truncated, but you can view the full file.
{"nodes":[{"id":1,"callFrame":{"functionName":"(root)","scriptId":"0","url":"","lineNumber":-1,"columnNumber":-1},"hitCount":0,"children":[2,286,653,670,673,692,1985,2005,2006,2007,2019,2022,2145,2156,2158,2161,2163,2530,2539,2545,2598,2622,2624,2625,2632,2642,2672,2682,2683,2780,2821,3149,3150,3184,3205,3231,3245,3246,3252,4030,4057,4263,4266,4267,4342,4586,4592,4646,4652,4660,4662,4664,4770,4782,4819,4867,4885,4937,4940,4950,4954,4989,5034,5038,5051,5078,5294,5329,5738,5928,6635,7429,7432,7464,7472,7492,7652,7658,8224,8306,12825,18901,18914,19119,22191,22402,23921,23928,23936,24141,24169,24187,24211,24308,24320,28643,28646,28651,28657,28688,29082,29230,29429,29493,29508,29562,29584,29631,29676,29990,30006,30009,30038,30464,30915,31639,31663,31707,31720,31739,33236,33680,39049,39050,39434,40439,40708,41665,42467,42610]},{"id":2,"callFrame":{"functionName":"processTicksAndRejections","scriptId":"39","url":"node:internal/process/task_queues","lineNumber":66,"columnNumber":34},"hitCount":24,"children":[3,457,45
@ImBIOS
ImBIOS / bug_template.md
Created August 2, 2022 06:20 — forked from automationhacks/bug_template.md
Bug template to help in writing clear bug reports

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Expected behavior

A clear and concise description of what you expected to happen.

Priority

What is the impact of this bug on the user, how critical is to fix? P0, P1 .. P4

@ImBIOS
ImBIOS / -setup-windows-wsl-devenv.md
Created July 13, 2022 01:29 — forked from leodutra/-setup-windows-wsl-devenv.md
Install and Setup Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

Setup Windows Subsystem 2 for Linux

Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

To setup native Linux, see this gist

Preview

Requirements