Skip to content

Instantly share code, notes, and snippets.

@nottux
Last active January 4, 2021 18:47
Show Gist options
  • Save nottux/cc5977600a591437e97811d3415f2547 to your computer and use it in GitHub Desktop.
Save nottux/cc5977600a591437e97811d3415f2547 to your computer and use it in GitHub Desktop.
Shortcuts
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'"
#sh -c "if $(xinput list-props 'HUION Huion Tablet Pen Pen (0)'|grep Coordinate|grep -q -);then xinput set-prop 'HUION Huion Tablet Pen Pen (0)' 'Coordinate Transformation Matrix' 1 0 0 0 1 0 0 0 1;else xinput set-prop 'HUION Huion Tablet Pen Pen (0)' 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1;fi"
bash -c 'a=($(xinput list-props "HUION Huion Tablet Pen Pen (0)"| grep -Po "Coordinate\sTransformation\sMatrix(.*?):\s\K.*"|tr -d ","));a[2]=$(echo ${a[0]}+${a[2]}|bc);a[5]=$(echo ${a[4]}+${a[5]}|bc);a[0]=$(echo ${a[0]}*-1|bc);a[4]=$(echo ${a[4]}*-1|bc);xinput set-prop "HUION Huion Tablet Pen Pen (0)" "Coordinate Transformation Matrix" ${a[*]}'
//NOTE FOR ONE ABOVE:
PARALEL WORKGROUPS:
1:
add first value to third
add fifth value to sixth
2:
multiply first value with -1
multiply fifth value with -1
pcmanfm-qt sftp://utku@$(until nmap -sP 192.168.1.1/24|grep android|grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}";do :;done)/home/main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment