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 / 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 / abuild.sh
Last active February 6, 2018 14:11
Simplistic abuild wrapper for building packages out-of-the-tree.
#!/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
#
# abuild.sh
# Simplistic abuild wrapper for building packages out-of-the-tree.
@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 / 02-protip-instagram.md
Created August 27, 2017 13:58
Protip: How to share photos on Instagram without using phone or 3rd party Instagram clients

Przemoc's protip (2017-08): Improve the way you upload photos to Instagram

Tired of sending photos to your phone just to share them on Instagram?

I would be too! Just use Google Chrome and visit instagram.com on your desktop PC/Mac. Yes, no need for 3rd party Instagram clients!

Go to Developer Tools (F12 or Ctrl+Shift+I), toggle device toolbar (Ctrl+Shift+M) and choose the screen to emulate or Responsive.

@przemoc
przemoc / 01-protip-youtube.md
Last active August 24, 2017 23:08
Protip: How to deal in the web browser with YouTube overlays showing at the end of videos and hiding content

Przemoc's protip (2017-08): Improve YouTube experience

Aren't you tired of overlays showing at the end of vids that hide content?

Me too! I figured out two easy solutions:

  1. Go to Developer Tools (F12 or Ctrl+Shift+I) and run following code in Console:

$$(".ytp-ce-element").forEach(function(el){el.style.display="none"})

@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 / reassemble_arguments.sh
Last active February 6, 2018 14:05
Reassemble arguments (support-most-cases implementation) in POSIX shell - Transforming "$*" into "$@"
#!/bin/sh
# SPDX-License-Identifier: MIT
## Copyright (C) 2016 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
# Reassemble arguments (support-most-cases implementation)
@przemoc
przemoc / keybase.md
Created February 11, 2016 23:54
Keybase proof

Keybase proof

I hereby claim:

  • I am przemoc on github.
  • I am przemoc (https://keybase.io/przemoc) on keybase.
  • I have a public key ASAqkyJiZIDm1BPnP-S3TSYm4W206lESRnwkf1Yp1B8jwwo

To claim this, I am signing this object:

@przemoc
przemoc / pigz.c-msys2-mingw-w64.patch
Last active March 27, 2024 09:35
Make pigz.c compilable on MSYS2+MinGW-w64
Make pigz.c (2.4) compilable on MSYS2+MinGW-w64.
diff --git a/pigz.c b/pigz.c
index bbbfd2cd19a1..85a61eeca674 100644
--- a/pigz.c
+++ b/pigz.c
@@ -324,6 +324,11 @@
// Use large file functions if available.
#define _FILE_OFFSET_BITS 64
@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