Skip to content

Instantly share code, notes, and snippets.

Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
CPU Family: 0x6
@BETLOG
BETLOG / 1-video-zoompanOnImage.sh
Last active December 21, 2020 02:30
ffmpeg zoom directly at target (more useful/visually expected than the typical examples)
#!/bin/bash
# betlog - 2020-12-20--23-01-02
# https://superuser.com/questions/1087685/ffmpeg-zoompan-image-to-center-position
# http://dragonquest64.blogspot.com/2019/02/ffmpeg-zoom.html <<<<------ THIS
#
# syntax:
# video-zoompanOnImage.sh [geometry(${sizeX}x${sizeY}+${posX}+${posY}] [zoom|zoompan] imageFilename
# omitting geometry or mode will query with kdialog
# eg:
# video-zoompanOnImage.sh image.png
@BETLOG
BETLOG / 1 - piinfo via systemctl service
Last active January 10, 2021 00:39
systemctl service - RPiCamWebInterface Annotation %a
[Unit]
Description=RPiWebCamInterface user annotation service
[Service]
Type=oneshot
ExecStart=/bin/bash /home/pi/piCamWebInterface-annotateService.sh
# scp /home/user/documents/scripts/raspberry/etc/systemd/system/piinfo.* pizerocam1:/tmp
# scp /home/user/documents/scripts/raspberry/home/pi/piinfo.sh pizerocam1:/home/pi
@BETLOG
BETLOG / 1 generate-motionMaskPGMs.sh
Last active January 2, 2021 11:24
generate-motionMaskPGMs.sh - for use with RPiWebCamInterface
#!/bin/bash
# betlog - 2021-01-02--21-07-42
#
# USE:
# 1 - in the RPi_Cam_Web_Interface for your camera > camera settings > set image res to match video res > 'record image' > 'download videos and images' > download the image
# 2 - open the exported image in your eitor of choice > paint areas to be monitored for motion as white and everything else black > save the file (replace the original)
# 3a - if you have a service menu set up as per the gist:
# - right click the now black and white file > convert > 'RPiCamWebInterface - generate And Install motionMask'
# 3b - if you just want to execute from a terminal:
# - execute: "RPiCamWebInterface-generateAndInstall-motionMaskPGM.sh <filename created above>"
@BETLOG
BETLOG / 1 - piinfo.sh via rc.local (preferred method)
Last active May 16, 2021 18:09
/etc/rc.local - RPiCamWebInterface Annotation %a
# Description: use /etc/rc.local to initiate a loop-script which writes to the RPiCamWebInterface Annotation (%a) file.
#
# servicectl services/timers may not run a 1 second timer at anyhting like 1 second intervals
# Whereas a script running a simple loop will. Particualrly if the loops timing accounts for minor variations.
#
# you can activate this either:
# 1) by manually adding the path/filename of the script to /etc/rc.local
# or
# 2) like I do: (as part of another script that loops through all of my pizerocams)
scp -q \
@BETLOG
BETLOG / move discord to 2nd display
Created January 12, 2021 01:27
move discord to 2nd display
#!/bin/bash
# move discord to lower screen, assumes specific resolution
if [[ $(xrandr|grep -c ' connected ') -gt 1 ]];then
id=$(xdotool search --name "Discord"|tail -n 1)
if [[ -n $id ]];then
wmctrl -ir $id -b remove,maximized_vert,maximized_horz
xdotool windowmove $id 0 1080
wmctrl -ir $id -b add,maximized_vert,maximized_horz
fi
fi
@BETLOG
BETLOG / nvidia_4Rx1C.sgrd
Created July 13, 2021 10:45
ksysguard tab: nvidia RTX 2060 sensors, 4 rows, 1 column.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE KSysGuardWorkSheet>
<WorkSheet columns="1" interval="1" locked="0" title="RTX2060" rows="4">
<host port="-1" command="/home/user/documents/settings/.local-share-ksysguard/nvidia-sensors.sh" shell="" name="nvidia"/>
<display row="0" title="Thermal" class="FancyPlotter" vScroll="0" fontSize="8" stacked="0" autoRange="1" vDistance="30" column="0" showUnit="0" columnSpan="1" version="1" svgBackground="" unit="" rowSpan="1" hLines="1" manualRange="0" labels="1" hScale="2" vLines="0">
<beam hostName="nvidia" color="0xff00ffff" sensorName="gpu_temp" sensorType="integer"/>
</display>
<display row="1" title="Clockspeed" class="FancyPlotter" vScroll="0" fontSize="8" stacked="0" autoRange="1" vDistance="30" column="0" showUnit="0" columnSpan="1" version="1" svgBackground="" unit="" rowSpan="1" hLines="1" manualRange="0" labels="1" hScale="2" vLines="0">
<beam hostName="nvidia" color="0xff00ffff" sensorName="gpu_clock" sensorType="integer"/>
<beam hostName="nvidi
@BETLOG
BETLOG / gist:e374b32291819f7fd44024808537d1ee
Last active June 19, 2022 04:16
issue #8639 - Konsole - starting steam
user@betlogbeast:~$ [2022-06-19 14:10:35] Startup - updater built Jun 18 2022 00:17:09
[2022-06-19 14:10:35] Opted in to client beta 'publicbeta' via beta file
You are in the 'publicbeta' client beta.
[2022-06-19 14:10:35] Loading cached metrics from disk (/home/user/.steam/package/steam_client_metrics.bin)
[2022-06-19 14:10:35] Using the following download hosts for Public, Realm steamglobal
[2022-06-19 14:10:35] 1. https://cdn.cloudflare.steamstatic.com, /client/, Realm 'steamglobal', weight was 100, source = 'update_hosts_cached.vdf'
[2022-06-19 14:10:35] 2. https://cdn.akamai.steamstatic.com, /client/, Realm 'steamglobal', weight was 100, source = 'update_hosts_cached.vdf'
[2022-06-19 14:10:35] 3. http://media.steampowered.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'
[2022-06-19 14:10:35] Verifying installation...
[2022-06-19 14:10:35] Verification complete
@BETLOG
BETLOG / gist:00eba8f8f1287e7953ea94dbe37a3bcb
Created June 19, 2022 04:15
issue #8639 - steam error.log
rm: cannot remove '/home/user/.steam/steam': Is a directory
rm: cannot remove '/home/user/.steam/bin': Is a directory
steam.sh[2922646]: Running Steam on ubuntu 20.04 64-bit
steam.sh[2922646]: STEAM_RUNTIME is enabled automatically
setup.sh[2922747]: Steam runtime environment up-to-date!
steam.sh[2922646]: Steam client's requirements are satisfied
Installing breakpad exception handler for appid(steam)/version(1655513879)
Installing breakpad exception handler for appid(steam)/version(1655513879)
Loaded SDL version 2.23.1-7331155
ComputeStartupMode: found registry default startup mode: 0Installing breakpad exception handler for appid(steam)/version(1655513879)
rm: cannot remove '/home/user/.steam/steam': Is a directory
rm: cannot remove '/home/user/.steam/bin': Is a directory
steam.sh[3819350]: Running Steam on ubuntu 20.04 64-bit
steam.sh[3819350]: STEAM_RUNTIME is enabled automatically
setup.sh[3819451]: Steam runtime environment up-to-date!
steam.sh[3819350]: Steam client's requirements are satisfied
Installing breakpad exception handler for appid(steam)/version(1658362681)
Installing breakpad exception handler for appid(steam)/version(1658362681)
Loaded SDL version 2.23.1-7374734
ComputeStartupMode: found registry default startup mode: 0Installing breakpad exception handler for appid(steam)/version(1658362681)