13 Jan 2016

Motion detection security system using a Linux computer and old Android phone(s)
  • Install and setup IP Webcam on Android phone(s), change settings, start server and turn off the screen to help prevent overheating (removing the back cover also helps) and for conserving power, even if it is plugged in.

  • Install motion software on the Linux computer (sudo apt-get install motion if using Ubuntu) and set it up (edit /etc/motion/motion.conf)

    • ffmpeg_cap_new off # to only capture images
    • netcam_url http://phone-ip-address:8080/video
    • netcam_userpass login:password # if any
  • Install and setup mutt for sending emails from Linux computer

  • Install inotify-tools on the Linux computer (for monitoring the creation of new image files)

  • Create a Bash script for monitoring motion’s temporary directory for new files (You should change my@email.com for your email but the default MONITORDIR directory should be fine)

      #!/bin/sh
      MONITORDIR="/tmp/motion/"
      inotifywait -m -r -e create --format '%w%f' "${MONITORDIR}" | while read NEWFILE
    
      timestamp() {
        date +"%T"
      }
    
      do
      echo "File ${NEWFILE} is attached.\r\n" | mutt -s "Motion detected @ $(timestamp)" my@email.com -a ${NEWFILE}
      done
    
  • Start motion software on Linux computer

  • Start the Bash script on the Linux computer for monitoring for new image files in /tmp/motion/ and automatically emailing them to you.

You should now be getting 1 email per image captured when motion is detected.

I changed the camera resolution to 1280x720 and the motion config setting “treshold” to 750, to increase sensitivity.

20 Dec 2015

Linux Count Video Frames

Count video frames using melt:

~/$ melt video.mp4 -consumer xml | grep length

20 Dec 2015

Linux Stabilize/Deshake Video Fix

Using transcode:

transcode -J stabilize –mplayer_probe -i yourmovie.avi
transcode -J transform –mplayer_probe -i yourmovie.ext -y raw -o yourstabilizedmovie.ext

05 Dec 2015

Germinating (Queen) Palm Seeds
  1. Microwave humidified dirt mix to sterilize it and let it cool down
  2. Using a sharpie, identify Ziplock bags with palm type, date, etc…
  3. Add humid dirt to Ziploc bags (not too wet or the seeds will rot)
  4. Add seeds to bags
    • For queen palm seeds, I have had better luck so far with orange seeds that just fell off the tree (as opposed to green seeds that I cut off the tree).
  5. Set the bags on a shelf at room temperature (they don’t need light)
  6. Wait from 1 to 6 months (no need to add water if you keep Ziplock bags sealed)
  7. Transplant germinated seeds to pots

The sprouted seeds should look similar to this: queen-pal-sprouted-seed

Source: Germinating Palm Seeds

19 Oct 2015

Combine PDFs using ghostscript in Linux

Using Ghostscript to combine PDF files

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile=out.pdf in1.pdf in2.pdf in3*.pdf

The prepress option is used to preserve higher quality (high quality, color preserving, 300 dpi imgs).

12 Sep 2015

Internet (web) without Google (aka Block Google IP addresses)

Block Google, completely

  1. Find Google IP addresses ranges

    Go to https://whois.arin.net/ui/advanced.jsp and Search for “Google LLC”, by Organization… Click each organization found and then select “Related Networks”.

  2. It gave me this list:

     GOOGLE-CLOUD (NET-104-154-0-0-1) 	104.154.0.0 - 104.155.255.255
     GOOGLE-CLOUD (NET-35-208-0-0-1) 	35.208.0.0 - 35.247.255.255
     GOOGLE-CLOUD (NET-35-192-0-0-1) 	35.192.0.0 - 35.207.255.255
     MEEBO (NET6-2620-84-1) 	2620:84:: - 2620:84:1:FFFF:FFFF:FFFF:FFFF:FFFF
     GOOGLE-CLOUD (NET-173-255-112-0-1) 	173.255.112.0 - 173.255.127.255
     GOOGLE-CLOUD (NET-104-196-0-0-1) 	104.196.0.0 - 104.199.255.255
     GOOGLE-CLOUD (NET-192-158-28-0-1) 	192.158.28.0 - 192.158.31.255
     GOOGLE-CLOUD (NET-199-192-112-0-1) 	199.192.112.0 - 199.192.115.255
     GOOGLE-CLOUD (NET6-2600-1900-1) 	2600:1900:: - 2600:190F:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
     GOOGLE-CLOUD (NET-162-222-176-0-1) 	162.222.176.0 - 162.222.183.255
     GOOGLE-CLOUD (NET-107-167-160-0-1) 	107.167.160.0 - 107.167.191.255
     GOOGLE-CLOUD (NET-107-178-192-0-1) 	107.178.192.0 - 107.178.255.255
     GOOGLE-CLOUD (NET-108-59-80-0-1) 	108.59.80.0 - 108.59.95.255
     GOOGLE-CLOUD (NET-130-211-0-0-1) 	130.211.0.0 - 130.211.255.255
     GOOGLE-CLOUD (NET-146-148-0-0-1) 	146.148.0.0 - 146.148.127.255
     GOOGLE-CLOUD (NET-162-216-148-0-1) 	162.216.148.0 - 162.216.151.255
     GOOGLE-CLOUD (NET-199-223-232-0-1) 	199.223.232.0 - 199.223.239.255
     GOOGLE-CLOUD (NET-23-251-128-0-1) 	23.251.128.0 - 23.251.159.255
     GOOGLE-CLOUD (NET-23-236-48-0-1) 	23.236.48.0 - 23.236.63.255
     LVLT-GOOGL-2-8-35-200 (NET-8-35-200-0-1) 	8.35.200.0 - 8.35.207.255
     LVLT-GOOGL-2-8-34-216 (NET-8-34-216-0-1) 	8.34.216.0 - 8.34.223.255
     LVLT-GOOGL-2-8-34-208 (NET-8-34-208-0-1) 	8.34.208.0 - 8.34.215.255
     LVLT-GOOGL-2-8-35-192 (NET-8-35-192-0-1) 	8.35.192.0 - 8.35.199.255
     GOOGLE-CLOUD (NET-35-184-0-0-1) 	35.184.0.0 - 35.191.255.255
     GOOGLE-CLOUD (NET6-2602-FF11-1) 	2602:FF11:: - 2602:FF11:FFF:FFFF:FFFF:FFFF:FFFF:FFFF
     GOOGLE-CLOUD (NET6-2600-2D00-1) 	2600:2D00:: - 2600:2D0F:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
     GOOGLE-CORP-74-125-116-0 (NET-74-125-116-0-1) 	74.125.116.0 - 74.125.119.255
     GOOGLE-CORP-74-125-120-0 (NET-74-125-120-0-1) 	74.125.120.0 - 74.125.123.255
     GOOGLE-CORP-216-239-35-0 (NET-216-239-35-0-1) 	216.239.35.0 - 216.239.35.255
     GOOGLE-CORP (NET-104-132-0-0-1) 	104.132.0.0 - 104.135.255.255
     GOOGLE-CORP-74-125-56-0 (NET-74-125-56-0-1) 	74.125.56.0 - 74.125.63.255
     GOOGLE-CORP-72-14-224-0 (NET-72-14-224-0-1) 	72.14.224.0 - 72.14.231.255
     GOOGLE-CORP-66-249-86-0 (NET-66-249-86-0-1) 	66.249.86.0 - 66.249.87.255
     GOOGLE-CORP-66-102-14-0 (NET-66-102-14-0-1) 	66.102.14.0 - 66.102.14.255
     GOOGLE-CORP-216-239-39-0 (NET-216-239-39-0-1) 	216.239.39.0 - 216.239.39.255
     GOOGLE-CORP-216-239-44-0 (NET-216-239-44-0-1) 	216.239.44.0 - 216.239.45.255
     GOOGLE-CORP-216-239-33-0 (NET-216-239-33-0-1) 	216.239.33.0 - 216.239.33.255
     GOOGLE-CORP-216-239-55-0 (NET-216-239-55-0-1) 	216.239.55.0 - 216.239.55.255
     GOOGLE-CORP-72-14-241-0 (NET-72-14-241-0-1) 	72.14.241.0 - 72.14.241.255
     GOOGLE-CORP-V6 (NET6-2620-15C-1) 	2620:15C:: - 2620:15C:FFF:FFFF:FFFF:FFFF:FFFF:FFFF
     GOOGLE-IT-IPV6 (NET6-2620-1000-1) 	2620:0:1000:: - 2620:0:10FF:FFFF:FFFF:FFFF:FFFF:FFFF
     GOOGLE-TATAC (NET-63-243-224-0-1) 	63.243.224.0 - 63.243.224.63
     GOOGLE-TATAC (NET6-2001-5A0-4400-1) 	2001:5A0:4400:: - 2001:5A0:4400:FFFF:FFFF:FFFF:FFFF:FFFF
     GOOGLE-VPN (NET-172-102-8-0-1) 	172.102.8.0 - 172.102.15.255
     GOOGLE-VPN (NET6-2605-EF80-1) 	2605:EF80:: - 2605:EF80:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
     GOOGLE-VPN (NET-192-104-160-0-1) 	192.104.160.0 - 192.104.161.255
     GOOGLE-VPN (NET-216-252-220-0-1) 	216.252.220.0 - 216.252.223.255
     GOOGLE-VPN (NET-209-107-176-0-1) 	209.107.176.0 - 209.107.191.255
     UU-65-216-183 (NET-65-216-183-0-1) 	65.216.183.0 - 65.216.183.255
     UU-63-88-22 (NET-63-88-22-0-1) 	63.88.22.0 - 63.88.23.255
     UU-65-220-13 (NET-65-220-13-0-1) 	65.220.13.0 - 65.220.13.255
     UU-65-202-192 (NET-65-202-192-0-1) 	65.202.192.0 - 65.202.192.255
     UU-65-196-120 (NET-65-196-120-0-1) 	65.196.120.0 - 65.196.121.255
     GOOGLE (NET-199-89-220-0-1) 	199.89.220.0 - 199.89.220.255
     GOOGLE (NET6-2620-E7-C000-1) 	2620:E7:C000:: - 2620:E7:C000:FFFF:FFFF:FFFF:FFFF:FFFF
     Q1208-63-226-245-56 (NET-63-226-245-56-1) 	63.226.245.56 - 63.226.245.63
     GOOGLE (NET6-2620-E7-4000-1) 	2620:E7:4000:: - 2620:E7:4000:FFFF:FFFF:FFFF:FFFF:FFFF
     GOOGLE (NET-199-88-130-0-1) 	199.88.130.0 - 199.88.130.255
     SAVV-S232078-3 (NET-209-185-108-128-1) 	209.185.108.128 - 209.185.108.255
     Q0702-63-158-137-224 (NET-63-158-137-224-1) 	63.158.137.224 - 63.158.137.231
     Q0708-63-237-119-112 (NET-63-237-119-112-1) 	63.237.119.112 - 63.237.119.119
     Q0708-208-46-199-160 (NET-208-46-199-160-1) 	208.46.199.160 - 208.46.199.167
     Q0807-67-148-177-136 (NET-67-148-177-136-1) 	67.148.177.136 - 67.148.177.143
     GOOGLE (NET-216-239-32-0-1) 	216.239.32.0 - 216.239.63.255
     EC12-1-GOOGLE (NET-64-68-80-0-1) 	64.68.80.0 - 64.68.87.255
     GOOGLE (NET-66-102-0-0-1) 	66.102.0.0 - 66.102.15.255
     GOOGLE (NET-108-177-0-0-1) 	108.177.0.0 - 108.177.127.255
     MICH-6184 (NET-198-108-100-192-1) 	198.108.100.192 - 198.108.100.207
     SAVV-S232078-1 (NET-216-33-229-144-1) 	216.33.229.144 - 216.33.229.151
     SAVV-S232078-2 (NET-216-33-229-160-1) 	216.33.229.160 - 216.33.229.167
     SAVV-S232078-26 (NET-64-68-88-0-1) 	64.68.88.0 - 64.68.95.255
     SAVV-S232078-11 (NET-216-109-75-80-1) 	216.109.75.80 - 216.109.75.95
     SAVV-S232078-24 (NET-64-68-64-64-1) 	64.68.64.64 - 64.68.64.127
     SAVV-S232078-21 (NET-64-41-221-192-1) 	64.41.221.192 - 64.41.221.207
     MEEBO (NET-199-36-152-0-1) 	199.36.152.0 - 199.36.159.255
     GOOGLE (NET-142-250-0-0-1) 	142.250.0.0 - 142.251.255.255
     GOOGLE-I83-80 (NET-12-216-80-0-1) 	12.216.80.0 - 12.216.80.255
     GOOGLE (NET-216-58-192-0-1) 	216.58.192.0 - 216.58.223.255
     GOOGLE (NET-172-217-0-0-1) 	172.217.0.0 - 172.217.255.255
     Q0312-2001-0428-6402-0204-0000-0000-0000-0000 (NET6-2001-428-6402-204-1) 	2001:428:6402:204:: - 2001:428:6402:204:FFFF:FFFF:FFFF:FFFF
     LVLT-GOGL-8-8-4 (NET-8-8-4-0-1) 	8.8.4.0 - 8.8.4.255
     LVLT-GOGL-4-3-2 (NET-4-3-2-0-1) 	4.3.2.0 - 4.3.2.255
     LVLT-GOGL-8-8-8 (NET-8-8-8-0-1) 	8.8.8.0 - 8.8.8.255
     MEEBO1 (NET-208-81-188-0-1) 	208.81.188.0 - 208.81.191.255
     GOOGLE (NET-74-114-24-0-1) 	74.114.24.0 - 74.114.31.255
     NET-209-141-120-128-GOOGLE-26 (NET-209-141-120-128-1) 	209.141.120.128 - 209.141.120.191
     NET-2605-5800-0-9-DC-64 (NET6-2605-5800-0-9-1) 	2605:5800:0:9:: - 2605:5800:0:9:FFFF:FFFF:FFFF:FFFF
     GOOGLE-IPV6 (NET6-2001-4860-1) 	2001:4860:: - 2001:4860:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
     GOOGLE-IPV6 (NET6-2607-F8B0-1) 	2607:F8B0:: - 2607:F8B0:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
     GOOGLE (NET-108-170-192-0-1) 	108.170.192.0 - 108.170.255.255
     GOOGLE (NET-172-253-0-0-1) 	172.253.0.0 - 172.253.255.255
     GOOGLE (NET-173-194-0-0-1) 	173.194.0.0 - 173.194.255.255
     GOOGLE (NET-192-178-0-0-1) 	192.178.0.0 - 192.179.255.255
     GOOGLE (NET-207-223-160-0-1) 	207.223.160.0 - 207.223.175.255
     GOOGLE (NET-209-85-128-0-1) 	209.85.128.0 - 209.85.255.255
     GOOGLE (NET-64-233-160-0-1) 	64.233.160.0 - 64.233.191.255
     GOOGLE (NET-66-249-64-0-1) 	66.249.64.0 - 66.249.95.255
     GOOGLE (NET-70-32-128-0-1) 	70.32.128.0 - 70.32.159.255
     GOOGLE (NET-72-14-192-0-1) 	72.14.192.0 - 72.14.255.255
     GOOGLE (NET-74-125-0-0-1) 	74.125.0.0 - 74.125.255.255
     METAWEB-001 (NET-208-68-108-0-1) 	208.68.108.0 - 208.68.111.255
     NET-209-141-121-192-GOOGLE-26 (NET-209-141-121-192-1) 	209.141.121.192 - 209.141.121.255
     NET-209-141-121-128-GOOGLE-26 (NET-209-141-121-128-1) 	209.141.121.128 - 209.141.121.191
     NET-2605-5800-0-20-64 (NET6-2605-5800-0-20-1) 	2605:5800:0:20:: - 2605:5800:0:20:FFFF:FFFF:FFFF:FFFF
     NET-2605-5800-0-21-64 (NET6-2605-5800-0-21-1) 	2605:5800:0:21:: - 2605:5800:0:21:FFFF:FFFF:FFFF:FFFF
     GOOGLE-IPV6 (NET6-2604-31C0-1) 	2604:31C0:: - 2604:31C0:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
     GL-654 (NET-136-22-6-0-1) 	136.22.6.0 - 136.22.7.255
    
  3. Next create an iptables/ip6tables script similar to this but with all the IP ranges from above:

     #!/bin/sh  
     # /etc/init.d/firewall
    
     IPT="/sbin/iptables"  
     IPT6="/sbin/ip6tables"  
    
     # Block Google
     $IPT -A INPUT -s 64.233.160.0/19 -j DROP  
     $IPT -A OUTPUT -d 64.233.160.0/19 -j DROP
     $IPT -A INPUT -s 2c0f:fb50:4000::/36 -j DROP
     $IPT -A OUTPUT -d 2c0f:fb50:4000::/36 -j DROP
    

04 Jun 2015

Exporting public key in GPG: “invalid characters” when loading in text editor (UTF-8)

GPG defaults to exporting to a binary format, the –armor command line argument can to be used for exporting to ASCII format for easy sharing using copy & paste.

~$ gpg --output my-public-key.gpg --armor --export one@email.com

27 Feb 2015

MiniDNLA: fix permissions/config files in Kubuntu to be able to share media from /home/myuser/media

Problem:

[2015/02/27 00:23:41] minidlna.c:955: error: Unable to set db_path [/var/cache/minidlna] ownership to 1000: Operation not permitted
[2015/02/27 00:23:41] minidlna.c:960: fatal: Failed to switch to uid '1000'. [Operation not permitted] EXITING.
[2015/02/27 00:27:25] minidlna.c:452: warn: Unable to change pidfile ownership
[2015/02/27 00:27:25] minidlna.c:960: fatal: Failed to switch to uid '1000'. [Operation not permitted] EXITING.

Solution:

$ chown -R myuser /var/cache/minidlna
$ chgrp -R myuser /var/cache/minidlna
$ vi /etc/default/minidlna
     add line: USER="myuser"
$ vi /etc/minidlna.conf
     change line: user=minidlna for user=myuser
     add line: media_dir=/home/myuser/media/

12 Feb 2015

Kubuntu Restore Display Output From Console After Turning it Off Using xrandr

After issuing a command like xrandr –output LVDS1 –off, you can switch to a console (--), edit /home/user/.kde/share/apps/kscreen/filename (where filename is the one from that directory that was last modified) and change “enabled” : false to “enabled” : true.

[ { "enabled" : false, "id" : "LVDS1", "metadata" : { "name" : "LVDS1" }, "mode" : { "refresh" : 60, "size" : { "height" : 768, "width" : 1366 } }, "pos" : { "x" : 1280, "y" : 128 }, "primary" : false, "rotation" : 1 }, { "enabled" : false, "id" : "thisid", "metadata" : { "fullname" : "thisname", "name" : "VGA1" }, "mode" : { "refresh" : 60, "size" : { "height" : 1024, "width" : 1280 } }, "pos" : { "x" : 0, "y" : 0 }, "primary" : true, "rotation" : 1 } ]

12 Feb 2015

Setup Fullscreen SDL Game to use monitor #X in a Dual-Monitor Scenario

In this example, use monitor VGA1 / monitor #0 and set it’s brightness:

export SDL_VIDEO_FULLSCREEN_HEAD=0
export SDL_VIDEO_FULLSCREEN_DISPLAY=0
xrandr --output VGA1 --gamma 2:2:2

Another way to set the monitor that will be used by a game (steam games for example) is to edit ~/.config/monitors.xml and change the primary monitor to the one the game should start in.

<primary>no</primary>;
<primary>yes</primary>;

Note: a restart was required for the change to take effect.

11 Feb 2015

IPTABLES: Open Firewall Ports for Serving Files Using DLNA/UPnP

IPTABLES: Open Firewall Ports for Serving Files Using DLNA/UPnP

iptables -A INPUT -s 192.168.1.0/24 -p tcp -m tcp --dport 8200 -j ACCEPT
iptables -A INPUT -s 192.168.1.0/24 -p udp -m udp --dport 1900 -j ACCEPT

11 Feb 2015

Linux convert videos/movies for playing on Vizio smart TV using avconv

By converting the movie’s video to Xvid and it’s audio to ac3 using avconv, I have found that it plays nicely on my Vizio TV. The libav-tools package and the mkv library needed to be installed first on my system (Ubuntu). Also avconv’s default video encoding quality is too low, hence the -b:v 1500k option.

sudo apt-get install libav-tools libmkv0
avconv -i input.mkv -vcodec mpeg4 -vtag xvid -b:v 1500k -c:a ac3 output.avi

29 Jan 2015

US Passport Application Photograph Template (Gimp XCF and JPG)

Using this template, you can order 6 passport pictures printed on one 4×6 photo for about $0.20 (only one needed per application). Download the JPG or Gimp’s XCF.

us-passport-photo-template-6x-4x6

us-passport-photo-template-6x-4x6_t

28 Jan 2015

Convert Multi-layer Gimp Image to Multi-Page PDF Using ImageMagick

Using ImageMagick’s convert utility, it can be done easily:

  1. Reverse order of layers (page one is bottom layer)

  2. Save as .mng (Multiple Network Graphic files – an animated image file format)

  3. On command line, ‘convert file.mng file.pdf’

Source

23 Jan 2015

Programming Honda Fit Key Fob Wireless Transmitter DIY

Note: That will only programs the lock/unlock/panic buttons. You will still need to get the immobilizer chip programmed at the dealer to be able to start the car.

PROGRAMMING THE REMOTE TRANSMITTER (KEYFOB):

NOTE: It is important to maintain the time limits between the steps. Make sure the doors, the hood and the hatch are closed.

1. Turn the ignition switch ON (II)
2. Within 1 to 4 seconds, press the transmitter lock button.
3. Within 1 to 4 seconds, turn the ignition switch OFF.

4. Within 1 to 4 seconds, turn the ignition switch ON (II).
5. Within 1 to 4 seconds, press the transmitter lock button.
6. Within 1 to 4 seconds, turn the ignition switch OFF.

7. Within 1 to 4 seconds, turn the ignition switch ON (II).
8. Within 1 to 4 seconds, press the transmitter lock button.
9. Within 1 to 4 seconds, turn the ignition switch OFF.

10. Within 1 to 4 seconds, turn the ignition switch ON (II).
11. Within 1 to 4 seconds, press the transmitter lock button.
12. Confirm you can hear the sound of the door lock actuators within 1 to 4 seconds, then push the transmitter lock button again, or the code will not be stored.

13. Within 10 seconds, press the transmitter lock button on any other fob you wish to program. Confirm that you can hear the sound of the door lock actuators after each transmitter code is stored.

14. Turn the ignition switch OFF, and remove the key.

15. Confirm proper operation with the transmitters.

Source

31 Dec 2014

RaspberryPi Xbian Error When doing Updates (apt-get update/upgrade)

The host xbian.brantje.com has been replaced with apt.xbian.org… so if you get the following error:

Err http://xbian.brantje.com stable/main Translation-en    
  Something wicked happened resolving 'xbian.brantje.com:http' (-5 - No address associated with hostname)

You need to edit /etc/apt/sources.lst so that it looks like this:

deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb mirror://apt.xbian.org/mirror.txt stable main

Also see the FAQ at http://www.xbian.org/faq/.

22 Dec 2014

Add “Strip Exif From JPG” Action to Dolphin’s Context Menu in Kubuntu/KDE

Below you can find instructions on how to add an action to the right-click context menu in Dolphin file manager for stripping one or multiple .JPG files from their Exif information.

First, find out where the new config file should be located:

$ kde4-config -path services
/home/user1/.kde/share/kde4/services/:/usr/share/kde4/services/

I chose to add it only for the current user:

$ vi /home/user1/.kde/share/kde4/services/strip_exif.desktop 
[Desktop Entry]
Type=Service
Name=convert
ServiceTypes=KonqPopupMenu/Plugin
Actions=Strip;
MimeType=image/jpeg;

[Desktop Action Strip]
Name=StripEXIF
Exec=convert -strip %f 'basename "%f" .JPG'_stripped.JPG
Icon=/usr/share/icons/Humanity/places/24/user-pictures.svg

It will not overwrite the picture, it will append _stripped to the filename. Just restart Dolphin for the changes to take effect.

Source and some reference.

Bonus: Here is a .desktop file for resizing one or multiples files to 1024×768:

$ vi /home/user1/.kde/share/kde4/services/resize_1024.desktop 
[Desktop Entry]
Type=Service
Name=convert
ServiceTypes=KonqPopupMenu/Plugin
Actions=Resize1024;
MimeType=image/jpeg;

[Desktop Action Resize1024]
Name=Resize1024
Exec=convert -resize 1024x768 %f 'basename "%f" .JPG'_1024x768.jpg
Icon=/usr/share/icons/Humanity/places/24/user-pictures.svg

12 Dec 2014

Using Linux terminal, copy Olympus TG-3 camera pictures over Wi-Fi
wget -q -O - http://192.168.0.10/DCIM/100OLYMP | awk -F\" '/wlansd\[[0-9]/ {print "http://192.168.0.10" $2}' | sed -E 's/.*JPG|MOV|AVI.+/\1/' | sed 's/,/\//' | xargs wget

via SOLVED using terminal: Olympus Compact Camera Talk Forum: Digital Photography Review.

08 Dec 2014

Setup LPR/LPD Printer Attached to ASUS RT-N66U under Kubuntu Linux

Kubuntu’s GUI printer configuration application ignores the queue name when setting up an LPR/LPD printer… If the router uses the default IP address, the address of the printer should be set to lpd://192.168.2.1/LPRServer but it is being set at lpd://192.168.2.1 (missing the queue name).

23 Oct 2014

Anonymize Windows-Phone-8 OSM-Logger GPS Traces Using a Perl Script

“Anonymize” and remove way-points (only keep ordered track points) from Windows-Phone-8 OSM-Logger .gpx GPS traces using a Perl script:

#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
use File::Slurp;

die "Usage: $0 [FILENAME.gpx]\n" if @ARGV < 1;
my $text = read_file($ARGV[0]);
$text =~ s/<name>.*?<\/name>/<name>name<\/name>/g;
$text =~ s/<desc>.*?<\/desc>/<desc>desc<\/desc>/g;
$text =~ s/<email .*? \/>/<email id="none" domain="test.com" \/>/g;
$text =~ s/<time>.*?<\/time>/<time>2000-01-01T00:00:00Z<\/time>/g;
$text =~ s/<wpt.*<\/wpt>//sg;
write_file( $ARGV[0], $text );