Skip to content

Instantly share code, notes, and snippets.

View rmi1974's full-sized avatar

Robert Michelsen rmi1974

  • Germany
View GitHub Profile
@rmi1974
rmi1974 / defrag_ext4_filesystem.md
Last active May 2, 2024 22:30
How to optimize / defrag ext4 filesystem #ext4 #commandlinefu

How to optimize / defrag ext4 filesystem

Make sure the target filesystem is sane

Open up the terminal and run:

sudo fsck.ext4 -y -f -v /dev/<disk/partition>
@rmi1974
rmi1974 / how_to_find_wine_mono_release_updates_in_wine.md
Last active April 23, 2024 08:33
How to find Wine-Mono release updates in Wine #wine #commandlinefu #wine-mono #mono #dotnet

How to find Wine-Mono release updates in Wine

List Wine-Mono releases

$ git remote -v
...
winehq	git://source.winehq.org/git/wine.git (fetch)
winehq	git://source.winehq.org/git/wine.git (push)
@rmi1974
rmi1974 / how_to_predeploy_wine_mono_and_wine_gecko_installers_for_all_wine_releases.md
Last active April 1, 2024 10:10
How to pre-deploy Wine-Mono and Wine-Gecko installers for all Wine releases #wine #commandlinefu #wine-mono #wine-gecko #mono #gecko

How to pre-deploy Wine-Mono and Wine-Gecko installers for all Wine releases

Wine-Gecko

Installer packages can be found here: [WineHQ Wine-Gecko Packages][1]

To work around WineHQ disallowing "spider" mode, use the following scriptlet which outputs the download URLs:

$ wget -qO- https://dl.winehq.org/wine/wine-gecko/ | \
@rmi1974
rmi1974 / how_to_find_wine_gecko_release_updates_in_wine.md
Last active April 1, 2024 09:57
How to find Wine-Gecko release updates in Wine #wine #commandlinefu

How to find Wine-Gecko release updates in Wine

List Wine-Gecko releases

$ git remote -v
...
winehq	git://source.winehq.org/git/wine.git (fetch)
winehq	git://source.winehq.org/git/wine.git (push)
@rmi1974
rmi1974 / wine_debugging_of_managed_code_using_windbg_cordbg.md
Last active March 30, 2024 23:09
Debugging of managed code using WinDBG/CorDbg in Wine #wine #debug #dotnet #commandlinefu

Debugging of managed code using WinDBG/CorDbg in Wine

Courtesy of [Wine Bugzilla #46842][1].

Prerequisites

  • Microsoft .NET Framework 4.x installed in WINEPREFIX (use 'winetricks' to install it)
  • Microsoft Debugging Tools for Windows installed in WINEPREFIX. Get them [here (64-bit)][2] and [here (32-bit)][3].

Set native overrides:

@rmi1974
rmi1974 / wine_pdb_symsrv_symbol_store.md
Last active March 2, 2024 08:36
How to create a symbol store for Wine .pdb files for use with SymSrv #wine #debug #symsrv #pdb #commandlinefu #lvm-pdbutil

How to create a symbol store for Wine .pdb files for use with SymSrv

Setup symbol store

Download and install Debugging Tools for Windows. See Links section at the bottom for all download links.

wget https://web.archive.org/web/20190317014905/http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools_amd64/dbg_amd64.msi

wine msiexec -i dbg_amd64.msi /quiet /qn /norestart
@rmi1974
rmi1974 / libfaketime_usage.md
Last active December 27, 2023 18:05
Using libfaketime to manipulate the system time for applications #faketime #wine #debug #commandlinefu

Using libfaketime to manipulate the system time for applications

See [libfaketime on github][1] for upstream project site general overview.

Build in multilib environment

#!/usr/bin/env bash

set -Eeuo pipefail
@rmi1974
rmi1974 / git_annex_useful_commands.md
Last active December 15, 2023 14:15
Git-annex useful commands #git #git-annex #commandlinefu

Git-annex useful commands

[git-annex][1]

git-annex allows managing files with git, without checking the file contents into git. While that may seem paradoxical, it is useful when dealing with files larger than git can currently easily handle, whether due to limitations in memory, time, or disk space.

Getting content

Get all content from backup remote:

@rmi1974
rmi1974 / how_to_force_a_disk_to_reallocate_bad_sectors.md
Last active December 12, 2023 00:25
How to force a disk to reallocate bad sectors #disk #health #commandlinefu

How to force a disk to reallocate bad sectors

Courtesy of [How to force a disk to reallocate bad sectors][1].

Sometimes a hard disk is hinting on an upcoming failure. Some disks start to make unexpected sounds, others are silent and only cause some noise in your syslog. In most cases the disk will automatically reallocate one or two damaged sectors and you should start planning on buying a new disk while your data is safe. However, sometimes the disk won’t automatically reallocate these sectors and you’ll have to do that manually yourself. Luckily, this doesn’t include any rocket science.

A few days ago, one of my disks reported some problems in my syslog while rebuilding a RAID5-array:

Jan 29 18:19:54 dragon kernel: [66774.973049] end_request: I/O error, dev sdb, sector 1261069669
@rmi1974
rmi1974 / unpack_wine_macos_pkg.md
Last active November 20, 2023 19:35
How to unpack Wine MacOS packages (.pkg) on Linux #wine #macos #commandlinefu #debug

How to unpack Wine MacOS packages (.pkg) on Linux

Mentioned in [Wine Bugzilla #48418][1]. Download of package from [WineHQ MacOS downloads][2].

$ sha1sum winehq-devel-5.0-rc4.pkg 
1abaaef7539226f19476ec70dad8741c26b3dbc2  winehq-devel-5.0-rc4.pkg

$ du -sh winehq-devel-5.0-rc4.pkg