Skip to content

Instantly share code, notes, and snippets.

@Postrediori
Postrediori / Build-higan-on-Fedora.md
Last active January 31, 2024 12:30
Build higan emulator (https://higan-emu.github.io) from a source code on a RedHat-based system (including Fedora and CentOS)

See also: Build ares emulator on Fedora – a newer emulator based on Higan/bsnes source code.

Introduction

This document describes hot to build higan emulator from a source code on a RedHat-based system (including Fedora and CentOS).

higan is an emulator for a number of classic video-game consoles of the 1980s and 1990s, allowing you to play classic games on a modern general-purpose computer.

@Postrediori
Postrediori / vimrc
Last active May 13, 2023 20:04
Config for Vim editor
" This is for vim, may not be compatible with vi
" Remove ^M characters in Linux with dos2unix:
" dos2unix .vimrc
" Line numeration
set nu
" Enable syntax highlighting
syntax on
@Postrediori
Postrediori / rotate-video.sh
Last active December 28, 2019 16:56
Script for downloading a video with orbits of Jupiter&asteroids and fixing rotation on Jupiter
#!/bin/bash
#
# Download Jupiter/asteroids video and fix Jupiter's rotation
#
# Tweet address with source video:
# https://mobile.twitter.com/AntonioParis/status/994224252961386496
#
# Required utils:
# * curl
# * convert

Launch Win32 executables on ARM host with QEMU and Wine

Introduction

This is guide describes the way to run Win32 executable files on ARM host (e.g. tablet) with Ubuntu 18.04 (16.04, 20.04 etc).

Outline

  1. Build static qemu-user-i386 on ARM host
  2. Type magic strings for Win32 executable file format in binfmts
@Postrediori
Postrediori / Interactive-Graphics.md
Last active December 31, 2023 09:13
Online Resources With Generative and Interactive Graphics

Introduction

THis is a list of interactive coding tools online.

GLSL-based interactive tools

Shadertoy

/*
libbase : version 0.09 ~byuu (2007-01-24)
*/
#ifndef __LIBBASE
#define __LIBBASE
#if defined(_MSC_VER)
//disable libc deprecation warnings in MSVC 2k5+
#pragma warning(disable:4996)
@Postrediori
Postrediori / Linux-EDUP-Wireless.md
Last active May 29, 2021 10:37
Linux setup for EDUP 802.11AC 1200M Dual Band USB wireless adapter

Description

New EDUP 802.11AC 1200M Dual Band USB wireless adapter does not work in Linux distributions by default. At least the following distributions lack the required kernel module:

  • Ubuntu 20.04
  • Ubuntu 21.04
  • Fedora 34

Solution

Manually build rtl88x2bu module from sources at cilynx/rtl88x2bu

@Postrediori
Postrediori / Linux-RocketLake-UHD-750.md
Last active June 17, 2023 13:18
Setup UHD 750 GPU on Intel Rocket Lake processors on Linux

Description

Linux distros don't support newest (May 2021) Rocket Lake GPUs by default. Tested on:

  • Fedora 34
  • Ubuntu 20.04.2.0
  • Ubuntu 21.04

Even if i915 module is loaded (lsmod | grep i915), the graphics is still running in software mode. This issue can be checked in the following ways:

@Postrediori
Postrediori / images_to_video.py
Created September 15, 2021 06:16
Convert video frames to video
#
# Convert images to video
#
# Example:
# python video.py -i 8012 -l 8151 -f 30 -t 800x600/IMG_%FRAME_NUM%_result.jpg
#
# ffmpeg command line from: https://github.com/justin-bennington/somewhere-ml/blob/main/S2_GAN_Art_Generator_(VQGAN%2C_CLIP%2C_Guided_Diffusion).ipynb
#
from PIL import Image