Skip to content

Instantly share code, notes, and snippets.

shmerl

Block or report user

Report or block shmerl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@shmerl
shmerl / picture_of_the_day.sh
Last active Feb 21, 2020
Downloads astronomy picture of the day
View picture_of_the_day.sh
#!/bin/bash
# Requires: curl, pcregrep, xdg-user-dir
site="https://apod.nasa.gov"
# redirect all the output to the log file
exec > $HOME/pictures/picture_of_the_day.log
exec 2>&1
View wine_esync_build.sh
#!/bin/bash
# Builds Wine+esync
# Notes:
# 1. Targeted for usage inside a VM (use shared directory $HOME/mnt/vmshare between host and guest).
# 2. You'd need to separately push the result on the host to whatever location you want (like to /opt).
# 3. Place any manual patches in ${HOME}/build/patches
# 4. Override arch to something else if you aren't using Ryzen.
View dxvk_build.sh
#!/bin/bash
# Notes:
#
# Example of building 64-bit and 32-bit winelib (.so) and dll variants of dxvk:
#
# for t in so dll; do for b in 64 32; do dxvk_type=$t dxvk_bitness=$b dxvk_build.sh; done done
#
base="${HOME}/build"
View mesa_run.sh
#!/bin/bash
# Assumes Mesa libraries are installed in /opt/${mesa_dir}/<arch_dir>
export mesa_dir=${mesa_dir:-"mesa-master"}
mesa_arch=${mesa_arch:-"x86_64"}
if [[ "$mesa_arch" == "x86_64" ]]; then
vulkan_icd=radeon_icd.x86_64.json
elif [[ "$mesa_arch" == "x86" ]]; then
View winetricks_run.sh
#!/bin/bash
# Configuration:
#
# WINEPREFIX what prefix to use (or will use the default).
# WINEPATH custom location of Wine if needed (custom variable for the script).
#
# Uses wine_env.sh
# Note, winetricks requires using WoW64 build of Wine.
View wine_run.sh
#!/bin/bash
# Configuration (set through environment variables):
#
# WINEPREFIX what prefix to use.
# WINEPATH to use custom location of Wine (e.g. /opt/wine-master).
# WINEARCH to set architecture (win64/win32).
#
# Notes:
View wine_env.sh
#!/bin/bash
# Helper script for wine_run.sh / winetricks_run.sh
# Sets environment and detects prefix arch. See wine_run.sh for details
# on configurable variables usage.
function get_wine_arch() {
local prefix="${WINEPREFIX:-"${HOME}/.wine"}"
local registry_winearch=$(perl -ne 'print $1 if /#arch=(win\d+)/' "${prefix}/system.reg" 2>/dev/null)
wine_arch=${WINEARCH:-"$registry_winearch"}
@shmerl
shmerl / mesa_debian_build.sh
Last active May 24, 2020
mesa_debian_build.sh
View mesa_debian_build.sh
#!/bin/bash
# Notes:
#
# 1. Works for tags and specific hash commits too (override mesa_branch variable with needed value).
#
# 2. By default builds for /opt/mesa-<branch> and places the result in ${HOME}/mnt/vmshare/mesa-<branch>
# You can override the build deployment location by setting dest_dir. For example this should put it right away
# in /opt/mesa-<branch>
#
View wine_build.sh
#!/bin/bash
# Builds Wine for the Witcher 3.
# Notes:
# 1. Targeted for usage inside a VM (use shared directory $HOME/mnt/vmshare between host and guest).
# 2. You'd need to separately push the result on the host to whatever location you want (like to /opt).
# 3. Place any manual patches in ${HOME}/build/patches
# 4. Override arch to something else if you aren't using Ryzen.
View gog_saboteur_multicore_fix.sh
#!/bin/bash
# Fixing Saboteur to run on CPUs with more than 4 cores.
# Thanks to jackfuste from WSGF, who found the fix.
# Make sure you have xxd installed
game_dir="$1"
game_binary="${game_dir}/Saboteur.exe"
gog_ver_sha512='d53682d0a0973cd1dfef97d3a2b55204298b89f16ac400e29aebb6b2143903758bbbb15c82de28ef0586dbfac7fb7a407f1c7c547419602ae1e9e0e601262c8e'
patched_sha512='884df371f4ec7c6cc79d5d1e2b37191b01db7e3f66c3ed5621e54f6164b3188b66b82eba833377924388e94a53886290b50613635bc889ae46c4fac2191ad443'
You can’t perform that action at this time.