Skip to content

Instantly share code, notes, and snippets.

Avatar

Przemysław Pawełczyk przemoc

View GitHub Profile
View memtest86+-4.00-test5-badram-patterns.patch
diff -ru memtest86+-4.00/error.c memtest86+-4.00x/error.c
--- memtest86+-4.00/error.c 2009-09-22 02:35:46.000000000 +0200
+++ memtest86+-4.00x/error.c 2010-01-30 16:15:11.000000000 +0100
@@ -256,8 +256,8 @@
clear_scroll();
v->erri.hdr_flag++;
}
- /* Do not do badram patterns from test 0 or 5 */
- if (v->test == 0 || v->test == 5) {
+ /* Do not do badram patterns from test 0 */
@przemoc
przemoc / Fix-lowercase-sample-paths-in-.sfz.patch
Created Sep 11, 2012
Sonatina Symphonic Orchestra 1.0 - fix lowercase sample paths in .sfz files
View Fix-lowercase-sample-paths-in-.sfz.patch
From 4e7de246fa2db00112abca27c58922f2003af4c5 Mon Sep 17 00:00:00 2001
From: Przemyslaw Pawelczyk <przemoc@gmail.com>
Date: Tue, 11 Sep 2012 23:40:07 +0200
Subject: [PATCH] Fix lowercase sample paths in *.sfz.
---
Brass - Bass Trombone Solo.sfz | 28 ++++-----
Brass - Horn Solo.sfz | 26 ++++----
Brass - Tenor Trombone Solo.sfz | 22 +++----
Brass - Trumpet Solo.sfz | 26 ++++----
@przemoc
przemoc / festalon-Fix-CPUID-availability-test-for-x86_64.patch
Created Jun 25, 2012
Patch for festalon 0.5.5 to make it compilable on amd64 (Ryan C. Underwood's one is needlessly big and breaking DRY rule). // http://projects.raphnet.net/#festalon
View festalon-Fix-CPUID-availability-test-for-x86_64.patch
From: Przemyslaw Pawelczyk <przemoc@gmail.com>
Date: Sun, 8 May 2011 23:16:55 +0200
Subject: [PATCH] Fix CPUID availability test for x86_64.
Before you got following gcc/clang error in x86_64:
cputest.c: Assembler messages:
cputest.c:38: Error: suffix or operands invalid for `pop'
cputest.c:41: Error: suffix or operands invalid for `push'
cputest.c:44: Error: suffix or operands invalid for `pop'
@przemoc
przemoc / alpha.cpp
Last active Feb 6, 2018
How to check whether alpha channel is used in ARGB32 QImage - http://stackoverflow.com/q/6157286/241521
View alpha.cpp
// 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
bool useAlpha = false;
const uchar* pixelData = image.bits();
int bytes = image.byteCount();
@przemoc
przemoc / xopen.c
Last active Feb 6, 2018
How to open a file and create all needed directories along the way - http://stackoverflow.com/q/11147850/241521
View xopen.c
/* SPDX-License-Identifier: MIT */
/*
* Copyright (C) 2012 Przemyslaw Pawelczyk <przemoc@gmail.com>
*
* This code is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
#include <errno.h>
#include <fcntl.h>
@przemoc
przemoc / FREEBSD-VM-URLS
Last active Dec 13, 2015
FreeBSD VirtualBox/VMware Images
View FREEBSD-VM-URLS
# FreeBSD 7.1
http://virtualboxes.org/images/freebsd/
# FreeBSD 9.0 -- pre-prepared VM image for Google Code-In
http://wiki.freebsd.org/GoogleCodeIn/GettingStarted
# FreeBSD 10.1, 10.2
http://www.osboxes.org/freebsd/
# FreeBSD STABLE, CURRENT snapshot -- pre-installed VM images
@przemoc
przemoc / tmux-Stop-searching-forward-at-the-end-of-the-buffer.patch
Created Feb 18, 2012
Patch for tmux 1.6: Stop searching forward at the end of the buffer.
View tmux-Stop-searching-forward-at-the-end-of-the-buffer.patch
From 6bccc3fc7362967ea7d4c296a22793f7f3a2c6d8 Mon Sep 17 00:00:00 2001
From: Przemyslaw Pawelczyk <przemoc@gmail.com>
Date: Sat, 18 Feb 2012 23:51:38 +0100
Subject: [PATCH] Stop searching forward at the end of the buffer.
Requested-by: Jacobo de Vera <devel@jacobodevera.com>
---
window-copy.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
@przemoc
przemoc / almost-endless-history.sh
Created Feb 2, 2012
How not to lose your BASH history (and make it more compact)
View almost-endless-history.sh
# Add following lines to:
# - /etc/bash.bashrc
# - /etc/profile
export HISTSIZE=1000000
export HISTFILESIZE=$HISTSIZE
export HISTCONTROL=ignoredups
@przemoc
przemoc / rc.lua
Created Feb 2, 2012
My trashy awesome/rc.lua file.
View rc.lua
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
-- Load Debian menu entries
@przemoc
przemoc / tmux-vm.sh
Last active Feb 6, 2018
Set up log/debug Linux kernel session w/ QEMU in tmux
View tmux-vm.sh
#!/bin/sh
# SPDX-License-Identifier: MIT
## Copyright (C) 2012 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
LDIR="$HOME/qemu"
KDIR="$LDIR/$1"