Skip to content

Instantly share code, notes, and snippets.

@Asbra
Asbra / disable_garena_service.bat
Created March 17, 2019 15:53
Disable Garena auto-start
@echo off
sc config "GarenaPlatform" start=demand
schtasks /TN "gxx speed launcher" /Change /Disable
@Asbra
Asbra / wallhaven_downloader.php
Created March 17, 2019 06:45
PHP Wallhaven.cc full-resolution wallpaper downloader by keyword search
<?php
//// Simple Wallhaven downloader
// Downloads wallpapers from Wallhaven.cc at full resolution by searching for specified keywords
$keywords = [
'waterfall',
'nature',
'mountains',
];
@Asbra
Asbra / youtube-remove-watched-videos-from-subscriptions.js
Last active June 27, 2020 12:40
YouTube Remove/Hide Watched videos from Subscriptions page (Bookmarklet)
///////////////////////////////////////////////////////////////////////////
// Scripts to hide already watched videos from YouTube subscriptions feed
// Removes videos counted as "Watched"
document.querySelectorAll('.yt-lockup-thumbnail.watched').forEach((e)=>{e.parentNode.parentNode.parentNode.remove()});
document.querySelectorAll('ytd-thumbnail-overlay-resume-playback-renderer').forEach((e)=>{e.parentNode.parentNode.parentNode.parentNode.parentNode.remove()});
// Removes videos which you've started watching (but not completed)
document.querySelectorAll('.yt-lockup-thumbnail.contains-percent-duration-watched').forEach((e)=>{e.parentNode.parentNode.parentNode.remove()});
@Asbra
Asbra / lcu-mm-auto-accept-auto-lock-champion.py
Last active September 18, 2023 12:41
League of Legends auto-accept matchmaking, auto-pick champion, insta-lock champion, via LCU API (any region)
###############################################################################
# League of Legends (LCU API) script
#
# Auto accept matchmaking
# Automatic/instant pick champion
# Automatic/instant lock champion
# Set High process priority
#
# Usage:
# python lcu-mm-auto-accept-auto-lock-champion.py "Jax" "Xayah"
@Asbra
Asbra / steam-wishlist-extractor.js
Created July 22, 2018 18:57
Utility for exporting your Steam wishlist (game titles)
/*
* Parse your Steam Wishlist to different formats
* Extract Steam Wishlist game titles list as a regex (for use with ruTorrent)
* Can be run as a bookmarklet or through the developer console of your browser
* URL: https://store.steampowered.com/wishlist/
*/
var regex_head = '(?:^(', // Add at start of list
regex_tail = '))', // Add at end of list
repl_space = '[\\s\\._-]', // Replace space characters with this
separator = '|'; // Character to separate the game titles
@Asbra
Asbra / imgur_album_delete_all.userscript.js
Last active December 1, 2020 19:58
Imgur delete all images in current album
deleteFromAccount = function(deletehash) {
$.ajax({
method: "POST",
url: "/delete/" + deletehash,
data: {
confirm: !0
},
displayGenericError: !1,
error: function() {
console.log("There was an error deleting your image", "error-msg")
@Asbra
Asbra / namecheap-bulk-search.js
Last active July 3, 2023 16:01
JS bulk domain search on NameCheap
// Needed to check a large amount of domains quickly and
// NameCheap UI can be really sluggish ..
// Script needs to be run from NameCheap.com
// To find current client_id go on a NameCheap search page,
// such as https://namecheap.com/domains/registration/results.aspx?domain=google&tlds=com
// Open source code, search for .cloudfront.net/search.js
// In that script search for {domainr:"
var client_id = "fb7aca826b084569a50cfb3157e924ae";
@Asbra
Asbra / base36-text-encode-decode.js
Last active June 8, 2017 02:05
Base36 string encoder/decoder
function decode(encoded) {
return parseInt(encoded, 36);
}
function encode(decoded) {
return Number(decoded).toString(36);
}
@Asbra
Asbra / adblock-script-loader.js
Created June 8, 2017 01:19
Anti-Adblock JavaScript loader
(function() {
var index = 0,
scripts = ["https://domain.tld/script1.js","https://otherdomain.tld/script2.js"],
newScriptNode,
loadScripts = function () {
if (index >= scripts.length) { return; }
newScriptNode = window.document.createElement("script");
newScriptNode.type = "text/javascript";
newScriptNode.async = true;
@Asbra
Asbra / enablecontextmenu.js
Created May 25, 2017 14:46
Re-enable right-click / context menu
window.oncontextmenu = null;
var elements = document.getElementsByTagName("*");
for (var id = 0; id < elements.length; ++id) {
elements[id].oncontextmenu = null;
}