Skip to content

Instantly share code, notes, and snippets.

View przemoc's full-sized avatar

Przemysław Pawełczyk przemoc

View GitHub Profile
@przemoc
przemoc / yt-sort-videos-by-length.js
Last active September 8, 2019 01:49
Bookmarklet for YouTube: Sort videos by length in videos tab
javascript:(function(){l=[].map.call(document.querySelectorAll("span.ytd-thumbnail-overlay-time-status-renderer"),function(e){l=e.innerHTML.trim().split(":").map(function(t){return parseInt(t)}).reduce(function(p,c){return p*60+c});return{a:e.parentElement.parentElement.parentElement,l:l}}).sort(function(a,b){return a.l-b.l});i=document.querySelector("#primary #items");l.forEach(function(o){i.appendChild(o.a.parentElement.parentElement.parentElement)})})()
@przemoc
przemoc / plzip-msys2-mingw-w64.patch
Created February 23, 2018 22:45
Make plzip compilable on MSYS2+MinGW-w64
Make plzip compilable on MSYS2+MinGW-w64.
It's Hannes Domani's plzip.patch taken from:
http://download.savannah.gnu.org/releases/lzip/plzip/plzip-1.1-w.zip
that was applied against plzip 1.7:
http://download.savannah.gnu.org/releases/lzip/plzip/plzip-1.7.tar.gz
changed to not artificially limit number of threads (the limit was 32),
and finally diff has been regenerated using output with unified context.
--- a/decompress.cc 2018-02-07 20:17:00.000000000 +0100
@przemoc
przemoc / tc-delaydnsreqs.sh
Last active April 9, 2021 13:51
Traffic control - Make DNS requests delayed and low priority on Linux
#!/bin/sh
# SPDX-License-Identifier: MIT
## Copyright (C) 2017 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
#
# Traffic control - Make DNS requests delayed and low priority on Linux.
@przemoc
przemoc / archive.today-reachability.md
Last active January 30, 2022 13:21
Archive.today reachability
@przemoc
przemoc / gitio
Last active February 2, 2022 11:59
Turn a github.com URL into a git.io URL.
#!/bin/sh
# SPDX-License-Identifier: MIT
## Copyright (C) 2011 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
#
# Usage: gitio URL [CODE]
#
@przemoc
przemoc / ssh-root-without-password-on-freebsd.md
Created March 24, 2017 12:00
ssh root without password on FreeBSD.

ssh root without password on FreeBSD

If you have some toy boards in your internal network, then you can happily live without password and key. As I learned today, setting following stuff in /etc/ssh/sshd_config is not enough:

PermitRootLogin yes
PermitEmptyPasswords yes
@przemoc
przemoc / stable-diffusion-webui.html
Created January 5, 2023 18:31
AUTOMATIC1111/stable-diffusion-webui useful-forks output
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<!-- saved from url=(0073)https://useful-forks.github.io/?repo=AUTOMATIC1111/stable-diffusion-webui -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async="" src="./stable-diffusion-webui_files/js"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
@przemoc
przemoc / kill-login-wall.md
Created October 23, 2022 22:42
Bookmarklet: Kill login wall

Bookmarklet: Kill login wall

Some sites needlessly force you to log in or sign up to continue browsing them. Sometimes it can be bypassed, partially or fully.

I will put down down JavaScript bookmarklets/snippets dealing with these nagging modal dialog boxes to some extent one way or another. No guarantee it will work in the future.

Tested in Chrome (106), Edge (106), Firefox (106).

Installation

@przemoc
przemoc / APK_Downgrade.md
Last active March 23, 2023 15:46
Android Application Downgrade