Skip to content

Instantly share code, notes, and snippets.

View ShawonAshraf's full-sized avatar
🐈

Shawon Ashraf ShawonAshraf

🐈
View GitHub Profile
@ShawonAshraf
ShawonAshraf / dm-toilet-paper.js
Created October 22, 2020 12:11 — forked from marco79cgn/dm-toilet-paper.js
Scriptable iOS widget that shows the amount of toilet paper which is available at your next dm drugstore
let storeId = 386
let param = args.widgetParameter
if (param != null && param.length > 0) {
storeId = param
}
const storeCapacity = await fetchAmountOfPaper()
const storeInfo = await fetchStoreInformation()
const widget = new ListWidget()
await createWidget()
@ShawonAshraf
ShawonAshraf / rocm-opencl.md
Created February 26, 2021 19:07
AMD Navi (Radeon RX 5500, 5600, 5700) OpenCL with ROCm for Fedora (and REHL, CentOS, ...)

AMD Navi OpenCL with ROCm

Mesa doesn't provide OpenCL 1.2 support for Navi

AMD provide closed-source AMDGPU-PRO OpenCL 2.0 (PAL for Vega and Navi and Legacy for older product)

Alternatively you can use open-sourced AMD Radeon Open Compute platforM with OpenCL 2.0 support (Hardware Support)

It doesn't breaks Mesa/LLVM dependencies or UEFI Secure Boot

@ShawonAshraf
ShawonAshraf / mac_gym_installer.sh
Created April 11, 2021 23:39 — forked from andrewschreiber/mac_gym_installer.sh
Installs OpenAI Gym on MacOS -
#!/bin/sh
# See video https://www.youtube.com/watch?v=7PO27i2lEOs
set -e
command_exists () {
type "$1" &> /dev/null ;
}
@ShawonAshraf
ShawonAshraf / NatualScrollingInWindows.ps1
Created April 30, 2021 02:06 — forked from 101v/NatualScrollingInWindows.ps1
Powershell script to enable natural scrolling in Windows
# View registry settings
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0
# Change registry settings
# Reverse mouse wheel scroll FlipFlopWheel = 1
# Normal mouse wheel scroll FlipFlopWheel = 0
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }
# Restore default scroll direction
# Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 1 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 0 }
@ShawonAshraf
ShawonAshraf / gnome-terminal-profiles.adoc
Created August 31, 2021 01:49
Export / Import Gnome Terminal Profiles

Export Gnome Terminal Profile

List profiles

dconf dump /org/gnome/terminal/legacy/profiles:/

Determine the terminal profile string for the profile you will need. This is the terminal profile that I will export:

using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@ShawonAshraf
ShawonAshraf / Steam_Proton_Exe.md
Created November 21, 2021 05:37 — forked from michaelbutler/Steam_Proton_Exe.md
How to run another .exe in an existing proton wine prefix

Running games through Steam's Proton is great. But what if there is a secondary exe or configuration application bundled with the game? How can you launch it if Steam itself only launches the game?

Simply run this command in a terminal:

cd /path/to/steam/steamapps/compatdata/20920/pfx

STEAM_COMPAT_DATA_PATH="/path/to/steam/steamapps/compatdata/20920" WINEPREFIX=$PWD \
    "$HOME/.steam/root/steamapps/common/Proton 5.0/proton" run ./drive_c/path/to/custom_application.exe