Some websites use ajax and dynamic viewing of larger images. For a colleage i grabbed a screenshot using below to get him a full sized campsite map.
Firefox example: Open the page, google maps for example. Press CTRL+SHIFT+M or Responsive Design View from the Developers Tools.
Change the size you want your virtual browser ( and doing so, your screenshot size here 2800 ) And click on the ‘take screenshot from viewport’ icon on the right.
A friend of mine wanted to monitor his UPS using domoticz. This UPS only had a simple web interface with information.
So we needed to scrape this information and push this into domoticz.
First create a dummy device in domoticz and note its IDX.
Then we can scrape needed information using below script.
#!/bin/bash
#set -x
# Domoticz server
SERVER="127.0.0.1:8080"
# APC Back-UPS HS 500 status URL
UPS="http://IP-OF-UPS/status.cgi"
# The number of the IDX in the list of peripherals
IDX="362"
# Path for temporary file (RAM drive)
TMPFILE="/tmp/apc-hs500-status.txt"
# Get APC Back-UPS HS 500 status and write to temporary file
wget $UPS -O $TMPFILE 2>/dev/null
if [ $? = 0 ]
then
PWR=$(cat $TMPFILE| tr -dc '[[:print:]]' |awk -F"Watts" '{print $1}' |rev |cut -f1 -d\> |rev |cut -f1 -d\&)
fi
if [ $PWR ]
then
echo "Load on Battery in Watts: $PWR"
# Send data to Domoticz
curl -s -i -H "Accept: application/json" "http://$SERVER/json.htm?type=command¶m=udevice&idx=$IDX&nvalue=0&svalue=$PWR"
PWR=""
fi
rm $TMPFILE
It uses canvas to draw lines and text, but thats only interesting for static stuff. ( https://www.w3schools.com/graphics/canvas_drawing.asp ) My example uses a php script to load information from a csv file. And loops though those entries and draw lens info.
Later i made a script to push this information in Grafana
Now for the SSH part. I’m jumping from machine to machine using ssh, sometime i loop back to a server i was already connected to .. this helps me to keep track
in ssh_config add
SendEnv SSHTRAIL
in sshd_config add
AcceptEnv SSHTRAIL
in /etc/profile
export SSHTRAIL=$SSHTRAIL:$HOSTNAME
restart sshd
when you do this on all your machines you can get a trail of ssh using:
echo $SSHTRAIL
workstation:server1:server66:server1
I could change the prompt when a loop is detected
echo $SSHTRAIL | sed -e 's/:/\n/g' | sort | uniq -c | grep -v 1 | ... | echo "WARNING: loop in ssh"
Cartridge not recognised? Just replace chip! With a original one
UPDATE: Maybe there is a counter in there, had a cartridge which wouldn’t work anymore ?!?
Cartridge saying .. i’m empty, but still visible ink?
Just tape up above part!
Note: there are many solutions found on the web, like opening the lid and pressing two buttons to get into a reset menu. Or Cold start your printer without cartrides 5 times to reset stored ink levels.
Vincent showed me a very beautiful “pruts” he made. It was the Boardgame from Jumanji. He asked someone from work to write software for the center display.
I really liked the idea, so i made my own version.
Vincents Jumanji Board, there is a Laptop behind the little glass circle
The second page should play a mp3 sound sample, but there is a autoplay issue with some browsers. (I have fixed this on other projects, i will fix this later.
Below is a picture of my mobile LMS server i used in my car. I only had radio and a CD player, i’m not a radio man .. folk, pipes and audiobooks
At the time i was working for Dutch Railways, imagine me walking with this blinky leds thingy, though the railway station …
It consisted of a dual port usb charger, a usb hub to power the drive, the rpi wasn’t strong enough. Thumbdrives where small in capacity, so i had to use a spinning disk harddrive. It was only a raspberry 1, in a case i had designed and lasercutted at Fablab Utrecht.
Now you can get rid of the Usb hub and harddrive using a small but with large capacity sdcards.
I could charge the thing in my car, and when i got home, it would connect to my home wifi network, sync-ed my MP3’s and turn off.