I’ve got a backup disk for my photos. You can connect it via USB and has a SDCard slot for your camera SDCards. You can also connect to is using it as a Wifi Access Point. (You can even install twonky!)
The cardreader should automatically copy a inserted card to its internal harddrive. I’ve tested this at home, but here in New Zealand it woudn’t work.
So i started investigating. (I was in the middle of nowhere, so I could not search for answers.)
I’ve got the juice ssh client on my phone. Connecting to the AP will give you a IP, but whats the IP from de WD? Just use JuiceSSH to make a local connection (to your android) first. And type: ip neigh This will give you the ip from neighbouring devices, thats only one .. the WD.
Connect to the WD with ssh using root@IPNUMMER (password should be same as you configured the device with)
Looking at the logs gave me some idea where the problem was.
It would not mount the sdcard! Why, that one is working. (In de Nikon Camera and using a cardreader with OTG on my android)
I first wrote my own mounter and copy program. That worked, so i could at least backup my photos. Now I could search for the problem.
My backup script named “script”
mkdir /tmp/fash ; mount /dev/mmcblk0p1 /tmp/fash mounts okay!
The sdmount.sh has a problem, it uses the timezone in its script. This will work when in GMT+12 -> GMT-12. But we are in NZ .. thats GMT+13
Removing some checks in above script (sdmount.sh) (Adding timeoffset_min=8) Made the script work for me again. When I got home from our trip, I flashed a new firmware version on the device, which corrected the problem.
#!/bin/bash
echo -n "\""
for f in `cat "$1"` ;do echo "$f" | tr -cd "[A-HL]_[0-9]" ; echo ; done | grep -v '^$' |grep _ > /tmp/parsons
let count=0
for f in `cat /tmp/parsons| tr -cd "[A-HL] \n"` ;do
if [ "$f" = "LG" ] ; then g=0; fi
if [ "$f" = "LA" ] ; then g=1; fi
if [ "$f" = "B" ] ; then g=2; fi
if [ "$f" = "C" ] ; then g=3; fi
if [ "$f" = "D" ] ; then g=4; fi
if [ "$f" = "E" ] ; then g=5; fi
if [ "$f" = "F" ] ; then g=6; fi
if [ "$f" = "HG" ] ; then g=7; fi
if [ "$f" = "HA" ] ; then g=8; fi
if [ $count -eq 0 ] ;then
echo -n "*";
((count++))
last=$g
else
if [ "2$g" -eq "2$last" ] ; then echo -n "r" ; fi
if [ "2$g" -lt "2$last" ] ; then echo -n "d" ; fi
if [ "2$g" -gt "2$last" ] ; then echo -n "u" ; fi
last=$g
fi
done
echo "\""
Just place all files in a directory on a php enabled webserver. The bash script is being run daily. (parsons bash script is called from this main script) These will generate 2 files One with the filename and all useful text like composers. And a file with the filename and the parsons code. Example:
11th of September, The.bww,"*udduddudduddudurrdudrrdudduddudrrduuuuududurrdudrrurrdududurrdudrrduddudurrduudduddudduddududdurdudrurdduddududr
urduuudrduddurdudrudrurduududdurdudrurdduddururdududduddudduddudruddudruddudduddudruddruududududududrudurddrududruddudrudduddudurddrudrrudrrudrrudrrudrrudrrudrrudrrudrrudrrudrrudrrudrrudrrudrrudrrudrrudrrud
rrudrrudrrudrrudrrudrrudrrudrrudrrudrruuduuduuduuduuduuudrduuduurduuduuurdrduuduuduuuduurduuduuduuduuduu"
xrandr is an official configuration utility to the RandR (Resize and Rotate) X Window System extension. It can be used to set the size, orientation or reflection of the outputs for a screen.
Someone broke my screen at a hackers event. The terminal was really hard to read with the black parts, so i tilted the screen
Broken screen in 2013
Quiet friday at work, playing with my little trusty 2530p. I’m using xmonad, so i don’t need any fancy work laptop.
Fun with distorting the screen
Another quiet friday at work, working from home, i turned all monitoring displays upside-down, sideways, or rotated them every so much seconds.
While this is a lot of fun to use, i used this to get my monitorsetups exactly the way i wanted, at home or at work. Different screen sizes, height differences .. no problem.
A fun tool to use is: https://github.com/qurn/xrandr-keystone-helper
Trying to fix a computer from my computer collection.
Comx-35 (1983)
RCA 1802 CPU @ 2.8 Mhz
32K Memory
Apparenty something wrong with the graphics chip.
The COMX uses the RCA CDP1869 and CDP1870 Video Interface System (VIS), consisting of the CDP1869 address and sound generator and the CDP1870 colour video generator.
Maybe next to try : checking signals using a Logic Analyzer
Never ask me to reset your password, i you are to stupid to remember or not using a passwordsafe … I WILL give you a new password, and you WILL remember not having to ask me again. 🙂 On this day i drew some example pictures for colleages.
Okay .. now some tips to create uniq passwords for every site in you head.
NOTES! .. CNN example uses google as secret key .. Want to type faster and not using mouse? .. Press home!
Type website
dirkjan (press home)
(press right) s
(press right) e
(press right) c
(press right) r
(press right) e
(press right) t
dsierckrjeatn <- your password
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
"If something is worth doing, it's worth overdoing."