Skip to content

Instantly share code, notes, and snippets.

View Kreyren's full-sized avatar
For Free Ukraine and Russia

KREYREN Kreyren

For Free Ukraine and Russia
  • Kralovec, Czech Republic
View GitHub Profile
#!/usr/bin/busybox sh
# Created by Jacob Hrbek <kreyren@rixotstudio.cz> under GPLv3 <https://www.gnu.org/licenses/gpl-3.0.en.html> with the help in freenode.net/#bash in 28/05/2020 11:09 CET
# shellcheck shell=sh
set -e
die() {
case "$2" in
*) printf 'FATAL: %s\n' "$3 $1"

I'm trying to install Mafia I on Linux which refuses to detect the CD.

Mafia I in Czech version has three CDs which are required to be inserted during the installation

I've deprecated a CD drive so this is downloaded from torrent (i own the phyicall copy of the game)

ISSUE

CDs are not detected during installation which seems to be looking for a CD called MAFIA_CD_1 witch A1.dta file (which is what i've understand from the err messages)

The ISO is mounted using sudo mount -o loop /path/to/mntdir /path/to/iso and set in winecfg to be autodetected (using CD-ROM and setting a label to MAFIA_CD_1 does not work)

Disclaimer: This is implemented as legal defence agains bad actors like (allegedly) dis.cool (https://www.reddit.com/r/discordapp/comments/eeoxwa/discool_collects_and_illegally_stores_your/)
By joining and actively or non-actively using this server (I.e having your account on this server) you agree that the informations provided in the timeline of your account being on this server are your own intellectual property that you are sharing as non-redistributable content for the purpose of communication.
Violation of this agreenment is considered as a direct violation of your right to your intellectual property and therefore is it prohibited under a sanction defined by the law.
You are not required to accept this agreement to the extent defined by the law to be considered as valid since you did not sign it. However nothing else grants you the permission of using this server. These actions are prohibited by law if you do not accept this agreement. Therefore by using this server you explicitly agree with these
@Kreyren
Kreyren / gist:3e55e9a754e58956e1690e38b1888de7
Last active March 20, 2020 10:44
HELP-WANTED: blackscreen on amdgpu load after bootloader

After bootloader i'm getting blackscreen

monitor outputing eqvivalent of no input message

i belive that this is being triggered on initialization of amdgpu since it's happening at the point where display usually changes the resolution and adding amdgpu.si_support=0 radeon.si_support=0 in kerneli cli allows me to boot and use GUI.

This is also happening on systemrescuecd with image that worked before on this system

This issue appeared suddenly while playing witcher2 after debian sandbox update

@Kreyren
Kreyren / MasterOfCCalculator.sh
Created January 20, 2020 15:11
Became master of C programming under 1,24sec using one short command!
( die(){ printf 'FATAL: %s\n' "$1" ;} ; mkdir -p "$HOME/C-Calculator/src" && printf '%s\n' "#include <stdio.h>" "#include <stddef.h>" '' "int main() {" " // Using float instead of double since it takes less space -> Experimenting if this is better then double" " float num1;" " float num2;" " char op; // Operator" " // Ask for user-input" " printf(\"%s\\n\",\"Enter first number: \");" " scanf(\"%f\", &num1);" " printf(\"%s\\n\", \"Enter an operator: \");" " scanf(\" %c\", &op);" " printf(\"%s\\n\",\"Enter Second number: \");" " scanf(\"%f\", &num2);" " // Action" " if(op == '+') {" " printf(\"Result: %f\\n\", num1 + num2);" " return 0;" " } else if(op == '-') {" " printf(\"Result: %f\\n\", num1 - num2);" " return 0;" " } else if(op == '*' || op == 'x') {" " printf(\"Result: %f\\n\", num1 * num2);" " return 0;" " } else if (op == '/' || op == ':') {" " printf(\"Result: %f\\n\", num1 / num2);" ' return 0;' '
@Kreyren
Kreyren / MasterOfCPing.sh
Created January 20, 2020 14:38
Became C programmer under 0,41sec
rm -r "$HOME/C-ping" ; ( mkdir -p "$HOME/C-ping/src" && printf '%s\n' '#include <stdio.h>' '' 'int main() {' ' printf("%s\n", "ping");' '}' > "$HOME/C-ping/src/main.c" && { cd "$HOME/C-ping/" || printf 'FATAL: %s\n' 'KURVA FUCK' ; } && gcc "$HOME/C-ping/src/main.c" && chmod +x "$HOME/C-ping/a.out" ; "/$HOME/C-ping/a.out" )
#!/bin/sh
# Created by Jacob Hrbek <kreyren@rixotstudio.cz> under the terms of GPL-3 (https://www.gnu.org/licenses/gpl-3.0.en.html) in 2020
# Created for https://bugs.winehq.org/show_bug.cgi?id=45546#c26
MAINTAINER="kreyren@rixotstudio.cz"
# Simplified assertion
die() { printf 'FATAL: %s\n' "$2" ; exit "$1" ;}
# Simplified output handling
@Kreyren
Kreyren / extage.sh
Created December 9, 2019 08:00
Fetch gentoo's portage on target
#!/bin/sh
# Copyright 2019 Jacob Hrbek <kreyren@rixotstudio.cz>
# Distributed under the terms of the GNU General Public License v3 (https://www.gnu.org/licenses/gpl-3.0.en.html) or later
die() { printf 'FATAL: %s\n' "$1" ; exit 1 ;}
debug() { printf 'DEBUG: %s\n' "$1" ;}
edo() {
$@ ; case $? in
0) ;;
*) die "$@ returned $?"
esac

I need a way to debug Linux kernel without rebooting:

Source

#!/bin/bash
# SYNOPSIS: $0 [path/to/kernel.img] [/dev/used/special/device]
# Created by github.com/kreyren under the terms of GPLv3 (https://www.gnu.org/licenses/gpl-3.0.en.html)

qemu-system-x86_64 \
-m 2G \
@Kreyren
Kreyren / sdhfdhdfgjh
Created August 11, 2019 12:25
CREATE DEBIAN LIVE USB WITH PERSISTENCE FOR BIOS AND UEFI
Credit: Diogenes
Edited by Kreyren
###CREATE DEBIAN LIVE USB WITH PERSISTENCE FOR BIOS AND UEFI
download debian iso from https://saimei.ftp.acc.umu.se/cdimage/unofficial/non-free/cd-including-firmware/10.0.0-live+nonfree/amd64/iso-hybrid/debian-live-10.0.0-amd64-xfce+nonfree.iso
copy it to /tmp
rename it to live.iso