Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Created by: Tk-Glitch <ti3nou at gmail dot com>
# This script replaces the wine-tkg PKGBUILD's function for use outside of makepkg or on non-pacman distros
## You can check for missing dependencies by running this script with either `--deps64` argument for 64-bit dependencies or `--deps32` argument for 32-bit dependencies :
# ./non-makepkg-build.sh --deps64
# ./non-makepkg-build.sh --deps32
@nottux
nottux / gallium nine on proton how to.txt
Created December 28, 2021 12:29
Gallium nine on steam proton how to:
General thread to discuss problems running games with gallium nine on.
Make sure you have mesa installed with gallium nine enabled.
In Ubuntu, Mint use the following PPA :
https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers
In the game's launch options put :
PROTON_DUMP_DEBUG_COMMANDS=1 PROTON_USE_GALLIUM_NINE=1 %command%
@nottux
nottux / 4chan grab all full size images
Created November 10, 2021 12:53
4chan grab all full size images
wget $(wget -O - {url here} | grep -Po 'File:(.*?)href="//\Ki.4cdn.org/(.*?)/[0-9]{13}.(.*?)(?=")')
@nottux
nottux / automate tachiyomi pdf creation.bash
Last active October 31, 2021 10:05
tachiyomi pdf creator in bash (beta)
#!/bin/bash
echo run me in manga root folder \(folder with the manga name\) to create a pdf where landscape images are rotated 90 degrees. Uncomment line 3 to not do any rotation. This script omits .gif files
for file in */*; do if [ $(identify -format '%[fx:(w/h>1)?1:0]' "$file") = 1 ];then mogrify -rotate 90 "$file";fi;done
## this one liner rotates landscape images 90 degrees so that I don't have to rotate my e-reader
eval convert $(ls */*.{jpg,png}|sed 's/Ch./Ch.\//'|sort -g -t / -k 2|sed 's/Ch.\//Ch./ ; s/.*/ '\''&'\''/') manga.pdf
## finally a sane way. took me hours
## Ditshick Translations_Ch.47 - Insistence food
#! /bin/sh
echo this script will delete the prefix if luancher, the game or patcher is not running
md5sum '/media/utku3/kioxia_32/Games/OriginsRO/prefix.tar'
tar -xf /media/utku3/kioxia_32/Games/OriginsRO/prefix.tar -C /dev/shm
cd '/dev/shm/ragnarok online origins/drive_c/OriginsRO'
GALLIUM_HUD="GPU-load+cpu+shader-clock+shader-clock" RADV_PERFTEST=aco WINEFSYNC=1 DXVK_HUD=full WINEPREFIX="/dev/shm/ragnarok online origins/" /home/utku3/.local/share/lutris/runners/wine/lutris-fshack-6.14-4-x86_64/bin/wine '/dev/shm/ragnarok online origins/drive_c/OriginsRO/OriginsroLauncher.exe'
sleep 10
while pgrep OriginsroLaunch > /dev/null || pgrep OriginsroPatch > /dev/null
do sleep 5
done
@nottux
nottux / gist:8943071b5feab818561a477acc9d6cbf
Last active June 16, 2021 10:20
extracting game launcher in bash
#!/bin/bash
process_name="$1"
case "$1" in
openarena)
t=/tmp/openarena_extracting
d='/dev/shm/openarena-0.8.8'
e='./openarena.x86_64'
f='/media/utku3/flash_drive/GAMING/openarena/openarena-0.8.8.tar.xz'
;;
https://android.stackexchange.com/a/158069/286740
```
adb shell
su
setprop persist.adb.tcp.port 5555
```
https://qr.ae/pGIZAH
fastboot oem unlock
fastboot oem off-mode-charge 0
@nottux
nottux / 2.java
Last active April 13, 2021 15:46
package labtest;
import java.util.Arrays;
import java.util.Scanner;
public class labtest {
public static void reverse(double[] array){
//reading array from reverse
for (int i = array.length-1; i >= 0; i--) {
System.out.print(array[i] + " ");
The required JAVA program is given below,
import java.util.Arrays;
import java.util.Scanner;
class Ideone {
// Finding the index of largest element
public static int indexOfLargestElement(double[] array){
double maxValue = array[0];
int maxIndex = 0;
@nottux
nottux / dire_situation.txt
Created March 6, 2021 23:39
important command since "gamer moment" caused hdd to rip
sudo dd if=/dev/sdb conv=sync,noerror bs=64K | xz -zevvkT0 -09 -c > /dev/shm/test.xz