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 / 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 / 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 / archive.today-reachability.md
Last active January 30, 2022 13:21
Archive.today reachability
@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 / 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 / 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 / hd-sentinel.md
Created May 3, 2019 21:58
Hard Disk Sentinel (standard) 5.30 for Windows for FREE

Hard Disk Sentinel is a good tool to check and monitor your disks parameters and health. You should consider having it in your toolbox.

Now you can get Windows version of Hard Disk Sentinel v5.30 (9417) for free at SharewareOnSale. After clicking "Download Hard Disk Sentinel Now" button you'll have to fill a form asking for email (they'll use it to send you news regarding SharewareOnSale offers), country, used platforms, gender, job level, and confirm it by clicking "Give it to me now". You'll get SharewareOnSale_Giveaway_Hard_Disk_Sentinel_hub.exe and also mail titled "Download is ready: Hard Disk Sentinel" starting with:

Hi there. Thank you for downloading from us. Your download details are given below.

Hard Disk Sentinel (100% discount)

YOUR DOWNLOAD(S)

@przemoc
przemoc / preferences
Created December 13, 2015 20:49
Switching from jessie to jessie-backports with support for installing stretch/sid packages. (/etc/apt/)
Package: *
Pin: release n=jessie-backports
Pin-Priority: 800
Package: *
Pin: release n=jessie-updates
Pin-Priority: 700
Package: *
Pin: release n=jessie
@przemoc
przemoc / 10-trackpoint.rules
Last active January 16, 2019 23:24
udev rule (put it in /etc/udev/rules.d/) to make trackpoint more sensitive and speedy
### default values: sensitivity=128, speed=97
ACTION=="add", SUBSYSTEM=="input", ATTR{name}=="TPPS/2 IBM TrackPoint", ATTR{device/sensitivity}="196", ATTR{device/speed}="255"
@przemoc
przemoc / fibonacci.asm
Created July 19, 2010 14:06
Fibonacci n-th number (modulo 2^32) in x86 assembler
; Fibonacci n-th number (modulo 2^32)
;
; input:
; ecx = n
; modifies:
; eax, ecx, edx
; ouput:
; eax = number
; size:
; 15 bytes