Skip to content

Instantly share code, notes, and snippets.

View b23prodtm's full-sized avatar

TiB Rkt Arimana b23prodtm

View GitHub Profile
@b23prodtm
b23prodtm / wsl2-setup-desktop-gnome.sh
Last active October 30, 2024 06:22
How to install Gnome for Ubuntu 22.04 on WSL2?
#!/usr/bin/env bash
if [ -z $(command -v wslvar) ]; then printf "%s\n" "Install package wslu please" ; sleep 2; exit 0; fi
username=$(wslvar USERNAME | awk '{ print tolower($0) }' )
mkdir -p --parents "/mnt/c/users/$username/.ubuntu/"
cd "/mnt/c/users/$username/.ubuntu"
if [ ! -f /etc/apt/sources.list.d/microsoft-prod.list ]; then
sudo apt-key adv --fetch-keys https://packages.microsoft.com/keys/microsoft.asc
sudo apt update
fi
if [ ! -f /etc/apt/sources.list.d/wsl-transdebian.list ]; then
@b23prodtm
b23prodtm / WSL 2 GNOME Desktop.md
Last active November 17, 2024 10:58
Set up a GNOME desktop environment on WSL 2

WSL 2 GNOME Desktop

NOTE: If you want the ultimate Linux desktop experience, I highly recommend installing Linux as your main OS. I no longer use Windows (except in a VM) so I will not be maintaining this guide anymore.

Think Xfce looks dated? Want a conventional Ubuntu experience? This tutorial will guide you through installing Ubuntu's default desktop environment, GNOME.

GNOME is one of the more complex — and that means more difficult to run — desktop environments, so for years people couldn't figure [o

@b23prodtm
b23prodtm / README.md
Last active January 26, 2023 13:40
AMD Radeon 7xxx Rom creator for Mac UEFI port mapping (+apple gray screen+mojave)

dump bios from your 77xx-79xx card and save it into this folder as cardname.rom find your 4 digit deviceid (if its 697a1002, then obviously you need only 697a, since 1002 is ATI vendor id (dont be stupid here, please)) run script, replace 697a with your deviceid and cadname.rom with your actual original video bios file

./makerom.sh --efifile=7950mac.efi --romfile=efiromheader.rom --originalrom=cardname.rom --devid=697a

WARNING, if you have uefi part in bios already (e.g. if its much larger than 65kb) then it will be overwritten with new efi part ORIGINAL ROM CREATOR 7xxx Efi Test

@b23prodtm
b23prodtm / createWindows10USBinstallerOnMac.sh
Last active November 1, 2021 18:19
Creating a Windows 10 USB Installer using macOS in 2020 - How to Make a Windows 10 USB Using Your Mac - Build a Bootable ISO From Your Mac's Terminal
#!/usr/bin/env bash
set -u
WIN_VOLUME=
DRIVE_NAME=
echo "
_.-;;-._
'-..-'| || |
'-..-'|_.-;;-._|
'-..-'| || |
jgs '-..-'|_.-''-._|"
@b23prodtm
b23prodtm / gitlab-runner-docker.sh
Last active December 30, 2022 00:32
Setup a Unix Runner on GitLab. To perform our own gitlab-runner at home.
#!/usr/bin/env bash
# to enable all branches, remove .gitlab-ci only:[/pr-*/] tags
shared=/srv
[ ! -e /etc/os-release ] && shared=/Users/Shared && echo "Not a Linux system.. srv=$shared"
shared_tags='light, docker, c3.small.x86'
PROJECT_REGISTRATION_TOKEN=''
[ "$#" -gt 0 ] && PROJECT_REGISTRATION_TOKEN=$1
printf "token PROJECT_REGISTRATION_TOKEN=%s\n" "${PROJECT_REGISTRATION_TOKEN}"
gitlab=$(docker ps -q -a -f "name=gitlab-runner")
[ "$gitlab" != "" ] && docker stop $gitlab && docker rm -f $gitlab
@b23prodtm
b23prodtm / WebDD.sh
Last active April 22, 2020 19:24
Unofficial Web Drivers nvda (translated from Chinese daliansky/Hackintosh)
#!/bin/bash
#WebDD v1.7
r="\\033[31;1m"
g="\\033[32;1m"
b="\033[36m"
k="\033[30m"
d="\\033[0m"
rm -rf /tmp/expanded.pkg 2>/dev/null
rm -rf /tmp/WebDriver-"$download_version".pkg 2>/dev/null
rm -rf /tmp/nvtmp 2>/dev/null
@b23prodtm
b23prodtm / auto-reboot.sh
Last active October 30, 2019 15:33
Check if the system dpkg need a restart and send corresponding signal, as a service
#!/bin/bash
# auto-reboot
# description: Check if the system dpkg need a restart and send corresponding signal
start() {
# code to start app comes here
# example: bahs -c "program_name" &
bash -c "while [ ! -f /var/run/reboot-required ]; do sleep 30; done; cat /var/run/reboot-required.dpkgs 2> /dev/null; reboot" &
echo $! > /var/run/chkdpkgs.pid
}
#!/usr/bin/env bash
usage="--- https://gist.github.com/b23prodtm/f285017729204b8c7cefb58cf5bdd304
Usage: $0 git-rm-submodule <path_to_submodule"
[ "$#" -lt 1 ] && echo -e $usage && exit 1
path=$1
git rm -r --cached $path
git commit -m "Removed submodule "
rm -rf .git/modules/$path
@b23prodtm
b23prodtm / deflate-kernel8-rpi-3-b.sh
Last active July 22, 2019 21:23
Inflate in /boot/firmware. Place the MicroSD on to the Raspberry Pi 3 and power it on.
#!/bin/bash
WORKDIR=$(pwd)
[ -z $1 ] && echo "Usage: $0 <system-boot-folder>" && exit 0
cd $1
echo "//config.txt
# Serial console output!
enable_uart=1
# 64bit-mode
@b23prodtm
b23prodtm / systemctl-wpa-supplicant.sh
Created April 17, 2019 17:08
Configure and enable wifi client with Ubuntu server LTS
#!/usr/bin/env bash
# Usage: $ scripts/systemctl-wpa-supplicant.sh
# source: https://www.linuxbabe.com/command-line/ubuntu-server-16-04-wifi-wpa-supplicant
#
function cfrm_act () {
def_go=$2
y='y'
n='n'
[ "$def_go" == "$y" ] && y='Y'
[ "$def_go" == "$n" ] && n='N'