Skip to content

Instantly share code, notes, and snippets.

@nottux
nottux / fred
Created January 23, 2020 23:19
script to grep .bash_history
if [ "$2" = "$a" ]
then grep $1 $HOME/.bash_history
else grep $1 /home/$2/.bash_history
fi
@nottux
nottux / boing
Created January 23, 2020 23:09
My boinc script that launches with two gpu's if argument passed
#! /bin/bash
b=/dev/shm/cc_config_boing.xml
echo -e '<!--\nThis is a minimal configuration file cc_config.xml of the BOINC core client.\nFor a complete list of all available options and logging flags and their\nmeaning see: https://boinc.berkeley.edu/wiki/client_configuration\n-->\n<cc_config>\n <log_flags>\n <task>1</task>\n <file_xfer>1</file_xfer>\n <sched_ops>1</sched_ops>\n </log_flags>\n <options>'>$b
if [ "$1" = "$a" ]
then echo ' <ignore_ati_dev>0</ignore_ati_dev>'>>$b
fi
echo -e ' <use_all_gpus>1</use_all_gpus>\n </options>\n</cc_config>\n'>>$b
cd /home/utku3/BOINC
boincmgr&boinc
@nottux
nottux / output_log__2019-12-04__19-31-22.txt
Created December 4, 2019 17:53
bug report for 7 days to die 18A, vulkan linux
Found path: /home/utku/took/happytosharemysteamapps/steamapps/common/7 Days To Die/7DaysToDie.x86_64
Mono path[0] = '/home/utku/took/happytosharemysteamapps/steamapps/common/7 Days To Die/7DaysToDie_Data/Managed'
Mono config path = '/home/utku/took/happytosharemysteamapps/steamapps/common/7 Days To Die/7DaysToDie_Data/MonoBleedingEdge/etc'
Preloaded 'ScreenSelector.so'
Preloaded 'libMagick.so'
Preloaded 'libMouseLib.so'
Preloaded 'libeac_server.so'
Preloaded 'libeasyanticheat.so'
Preloaded 'libgetrss.so'
Preloaded 'libsteam_api.so'
@nottux
nottux / opencl-amd_aur_ubuntu.bash
Last active October 19, 2023 20:23
bash implementation of opencl-amd AUR package, Install opencl amdgpu amdgpu-pro opencl only. Supports ubuntu and others with standard prefix
#!/bin/bash
# DO NOT run the line 167 standalone. It will remove the necessary files besides the junk!
if echo $@|grep -q "\-\-help\|\-help\|\-h\|help\|\-\-h\|\-\-no\-deb\|\-\-no\-install\|\-\-no\-cleaning\|\-\-assume\-debian"
then :
else echo wrong entry\(ies\) !
help=yes
fi
if echo $@|grep -q "\-\-help\|\-help\|\-h\|help\|\-\-h" || [ "$help" = yes ]
@nottux
nottux / kdeconnectd
Last active October 9, 2019 11:50
kdeconnectd disabling auto-start but still being able to launch it manually solution
if [ "$1" = run ]
then echo "press Ctrl+C to stop"
a=$(mktemp -d)
sudo -E su -c "cp /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd $a;chmod -R 777 $a;su $USER -c $a/kdeconnectd&su $USER -c kdeconnect-indicator"
rm -rfv $a
fi
if [ "$1" = disable ]
then sudo chmod -x /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
fi
if [ "$1" = enable ]
@nottux
nottux / gist:7a864489a7d2f039121648c532ce2fbf
Created October 3, 2019 09:04
Overwatch Highlight export, Metedata via MediaInfo: WEBM ULTRA 60FPS 4K 1X SUPER SAMPLING
General
Count : 332
Count of stream of this kind : 1
Kind of stream : General
Kind of stream : General
Stream identifier : 0
Inform : WebM: 206 MiB, 24 s 700 ms
Count of video streams : 1
Count of audio streams : 1
Video_Format_List : VP8
sh -c 'a=$(mktemp -u).png;b=/home/utku3/Pictures/text_shots/$(date +%Y-%m-%d_%H:%M:%S:%N);scrot -q100 $a&&tesseract $a $b||echo scrot or tesseract failed>>$b.txt;rm $a'
#sh -c 'a=$(mktemp -u).png;b=/home/utku3/Pictures/text_shots/$(date +%Y-%m-%d_%H:%M:%S:%N);scrot -q100 $a 2>$b.txt&&tesseract $a $b 2>$b.txt||echo scrot or tesseract failed>>$b.txt;rm $a'
sh -c 'scrot /home/utku/Resimler/scrot/$(date +%Y-%m-%d_%H:%M:%S:%N).png'
sh -c 'a=$(mktemp -u).png;b=/home/utku3/Pictures/text_shots/$(date +%Y-%m-%d_%H:%M:%S:%N);import $a&&tesseract $a $b||echo scrot or tesseract failed>>$b.txt;rm $a'
eval "sudo su -c 'echo powersave>/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&echo 0|tee /sys/devices/system/cpu/cpu{1..$(($(nproc)-1))}/online'"
@nottux
nottux / dpm_utilities.txt
Last active September 10, 2019 19:58
dpm utilities
{sudo password here} {device number here} {.wav file here} {temperature degree here} {screenshot directory}
To watch temperature:
#old_one:
while true;do a=$(echo {sudo password here}|sudo -S cat /sys/kernel/debug/dri/{device number here}/amdgpu_pm_info|grep Temperature|tr -d ' GPUTmpratueC:');echo $a;cat /sys/class/drm/card{device number here}/device/power_dpm_force_performance_level;if [ $a -gt {temperature degree here} -a $a -ne 511 ];then aplay --device=pulse {.wav file here};else echo cool;fi;sleep 5;done
#New one:
while true;do a=$(echo {sudo password here}|sudo -S cat /sys/kernel/debug/dri/{device number here}/amdgpu_pm_info|grep Temperature|tr -d ' GPUTmpratueC:');echo $a;cat /sys/class/drm/card{device number here}/device/power_dpm_force_performance_level;if [ $a -gt {temperature degree here} -a $a -ne 511 -a $(cat /sys/class/drm/card{device number here}/device/power_dpm_force_performance_level) != auto ];then echo {sudo password here}|sudo -S su -c 'echo auto>/sys/class/drm/card{device number here}/
@nottux
nottux / gist:4f511605f5278b11fcc2e1d90f88874b
Created May 6, 2019 20:01
pop_os! fail when grub installs
[INFO distinst:crates/disks/src/config/disk.rs:163] obtaining disk information from /dev/sda
[INFO distinst:crates/disks/src/serial.rs:16] obtaining serial model from /dev/sda
[INFO distinst:crates/disk-ops/src/parted.rs:28] opening disk at /dev/sda
[INFO distinst:crates/disks/src/config/partitions/mod.rs:109] obtaining partition information from /dev/sda1
[INFO distinst:crates/disks/src/config/partitions/mod.rs:109] obtaining partition information from /dev/sda2
[INFO distinst:crates/disks/src/config/partitions/mod.rs:109] obtaining partition information from /dev/sda3
[INFO distinst:crates/disks/src/config/disk.rs:163] obtaining disk information from /dev/sdb
[INFO distinst:crates/disks/src/serial.rs:16] obtaining serial model from /dev/sdb
[INFO distinst:crates/disk-ops/src/parted.rs:28] opening disk at /dev/sdb
[INFO distinst:crates/disks/src/config/partitions/mod.rs:109] obtaining partition information from /dev/sdb2
http://gpuz.techpowerup.com/19/03/05/rx9.png
http://gpuz.techpowerup.com/19/03/05/fcs.png