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 / 0001-BadRAM-for-v2.6.32.x.patch
Last active December 15, 2015 11:09
BadRAM for v2.6.32.x
From 5d920ec604a896cfd8419f9360f3a81adedd19eb Mon Sep 17 00:00:00 2001
From: Przemyslaw Pawelczyk <przemoc@gmail.com>
Date: Sat, 30 Jan 2010 20:57:06 +0100
Subject: [PATCH] BadRAM for v2.6.32.x
Attempt to adapt BadRAM patches to recent kernel versions. Includes
improvements and fixes(?). Were previous versions working on x86_64?
I am kernel newbie so all my below thoughts might be severly wrong.
I am not sure about correctness of x86_32 path involving highmem. It is
@przemoc
przemoc / calcswsa.sh
Last active February 6, 2018 13:50
Shell script for calculating Sec-WebSocket-Accept from Sec-WebSocket-Key
#!/bin/sh
# SPDX-License-Identifier: MIT
## Copyright (C) 2013 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
_calcswsa()
{
#!/bin/sh
# SPDX-License-Identifier: MIT
## Copyright (C) 2013 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
#
# Simple script for downloading program stored on CNET:
# - AOMEI Partition Assistant Standard
@przemoc
przemoc / gist:a6a2bf05e112910be944
Created August 23, 2014 12:40
[Arch] List provisions with packages providing them
# [Arch] List provisions with packages providing them
# pacman-based solution
pacman -Si \
| awk '/^$/{n=""}/^Name/{n=$3}/^Provides/{if($3!="None"){for(i=3;i<=NF;i++){if(t[$i]=="")t[$i]="";t[$i]=t[$i]" "n}}}END{for(p in t)printf("%44-s :%s\n",p,t[p])}' \
| sort | less
# expac-based solution (better)
expac -S "%n %P" \
| awk 'NF>1{for(i=2;i<=NF;i++){if(t[$i]=="")t[$i]="";t[$i]=t[$i]" "$1}}END{for(p in t)printf("%44-s :%s\n",p,t[p])}' \
@przemoc
przemoc / APK_Downgrade.md
Last active March 23, 2023 15:46
Android Application Downgrade
@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 / 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 / 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 / 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 / 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)