OpenDroneMap – Process drone images

Install docker

sudo apt install docker

Create a new folder for OpenDroneMap to use

mkdir ODM 
cd ODM
mkdir images

Put all your drone images in the new images directory

Run command to process images.

sudo docker run -ti --rm -v ./ODM:/datasets/code opendronemap/odm --project-path /datasets

Note: ./ODM is the folder that the output will be stored. You need your drone images inside an images folder inside your working directory. i.e. Drone images go inside ODM/images

Linux night light script

The following script let you turn your screen brightness up/down, but also adjust the color for night time.

Copy and paste code below in a nightlight.sh file

chmod +x nightlight.sh

and run

./nightlight.sh on .5

Code:

#!/bin/sh
export DISPLAY=$(w $(id -un) | awk 'NF > 7 && $2 ~ /tty[0-9]+/ {print $3; exit}')
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

display=`xrandr | grep "\ connected" | cut -d" " -f1`
brightness="$2"
# Check if brightness was specified.  If not, set screen to 50% brightness
if (echo $2 | grep [0-9]);then
         brightness="$2"
elif (echo $1 | grep -q help);then
         echo "############"
else
         brightness=".5"
         echo "Brightness variable not set, setting to fallback of 50%"
fi
night_mode() {
   for disp in ${display}; do
     xrandr --output $disp --gamma $1 --brightness ${brightness}
  done }
# auto is for future development
# auto() {
# The idea behind auto is to setup something that can pull the actual sunrise/sunset times then automatically adjust the display.
# Ideally there would be an algorithm so it does it slowly over a period of time, say slightly change the color over 30 minutes.
# until the desired color limit is reached
#
# curl sunrise-sunset.com/timezone/time
# if (time > sunset && colorTemp != colorTempMin); then
# set color to current temp-1
# elif (time > sunrise && colorTemp != colorTempMax); then);
# set to full brightness and temp
# else
# unable to parse, skipping.
# fi
#}
 
help() {
echo " Help for nightmode script.  
How to run script
./nightmode.sh on/off brightness
Examples: 
Turn nightmode on and set screen brightness to 75%
./nightmode.sh on .75
Turn night mode off and set screen brightness to 100%
./nightmode.sh off 1
"
}
case $1 in
  off) night_mode 1:1:1 1.0 ;;
  help) help ;;
  auto) auto ;;
  *) night_mode 1:1:0.5 ;;
esac

Setup in crontab to automatically trigger when it gets night or morning

* 21 * * * ~/nightlight.sh on .5  # Turn on at night
* 7 * * * ~/nightlight.sh off 1  # Turn off in the morning

Convert Kismet NetXML capture to CSV

First download the following python script which we’ll use to convert the Kismet NetXML file.

https://github.com/MichaelCaraccio/NetXML-to-CSV

wget https://raw.githubusercontent.com/MichaelCaraccio/NetXML-to-CSV/master/main.py

You should now be able to run the script with.

python main.py 

Help output for NetXML to CSV

bob@localhost:~$ python main.py  
Usage: main.py <NetXML File> <oUTPUT File Name> <Filter> (Filter is optional)
bob@localhost:~$

Usage

python main.py Kismet-file-input.netxml Kismet-csv-output.csv

Example of converting file.

bob@localhost:~$ python main.py Kismet-20191023-12-50-42.netxml Kismet-20191023-12-50-42.csv

You can now import the csv into Google Earth.

Check Access Logs for website

Typically on a cPanel host your access logs are kept in

/usr/local/apache/domlogs/username/incredigeek.com

Where username is your cPanel username and incredigeek.com is your website.

To view the logs you can use tail -f to follow the log.

tail -f /usr/local/apache/domlogs/username/incredigeek.com

You can also use grep to search the logs.

grep "text to search" /usr/local/apache/domlogs/username/incredigeek.com