Skip to content

Instantly share code, notes, and snippets.

View ShawonAshraf's full-sized avatar

Shawon Ashraf ShawonAshraf

View GitHub Profile
@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
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 / 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:

@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 / 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 / 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 / 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 / PKGBUILD
Created December 12, 2019 00:47 — forked from naetherm/PKGBUILD
rocr-runtime
pkgname=rocr-runtime
pkgver=2.10.0
pkgrel=1
pkgdesc="ROCm HSA"
arch=(x86_64)
url="https://github.com/RadeonOpenCompute/ROCR-Runtime"
license=('unknown')
makedepends=(git cmake gcc ninja)
depends=('roct-thunk-interface')
source=("https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/roc-$pkgver.tar.gz")
@ShawonAshraf
ShawonAshraf / FontNames-iOS12.swift
Created August 26, 2019 21:00 — forked from tadija/FontNames-iOS-17.4.swift
iOS - All Font Names
/*
*** Academy Engraved LET ***
AcademyEngravedLetPlain
---------------------
*** Al Nile ***
AlNile
AlNile-Bold
---------------------
*** American Typewriter ***
AmericanTypewriter
@ShawonAshraf
ShawonAshraf / curl.md
Created May 21, 2019 18:19 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.