Here’s a few useful links for creating plugins for Adobe Lightroom:
- Lightroom SDK guid
- Lua language online book
- Lightroom SDK documentation of the modules
- Lua IDE
- Debugging Lua
Other specific Lua stuff which might be useful:
Here’s a few useful links for creating plugins for Adobe Lightroom:
Other specific Lua stuff which might be useful:
The downloaded maps can be installed using ManageMaps (a custom app from Garmin, not on the app store) or simply by copying the content of the zip to either:
See this for more info
While this makes the map available in BaseCamp it doesn’t really make it easy to download multiple maps and manage these. So download JaVaWa GMTK which is a utility tool to enable e.g. rename of the map making it easier to manage a set of different maps.
Here is a small tool for opening resources in Eclipse in system navigator:
The source is at: https://github.com/lausdahl/eclipsedevutils
I recently discovered that Windows does something funny when the path variable gets too big. (Here I mean that PATH variable + the user PATH variable).
The funny thing is that it seems to permute the string somehow because after adding/removing an extra string Windows and all new cmd’s would loose all knowledge of the PATH variable until next reboot. Then after reboot it comes back to life again.
An interesting observation was to see how windows uses the path variable internally, and that is for opening the dialogue where you change the PATH variable
I found an approach that shortened the path enough for me here
Basically I converted the path to the short 8dot3 format with this script:
@echo off SET MyPath=%PATH% echo %MyPath% echo -- setlocal EnableDelayedExpansion SET TempPath="%MyPath:;=";"%" SET var= FOR %%a IN (%TempPath%) DO ( IF exist %%~sa ( SET "var=!var!;%%~sa ) ELSE ( echo %%a does not exist ) ) echo -- echo !var:~1!
This setup attempts to configure a network where one subnet (192.168.2.x) uses a VPN connection as its default route where as another subnet (192.168.1.x) has a default route to the internet. The devices on each subnet should be able to see each other and communicate, this might be used for e.g. Apple TV (see).
Here is an overview of how the system could look like:
This router cannot use the default DD-WRT setup but needs to be configures as a “router” and not a gateway, because we don’t want NAT. We want to provide direct access between R1 and R2:
Configure the WAN side to obtain an ip from R1, we will declare this as a static entry such that it always gets the same ip (in R1):
The router mode must be changed in R2:
And finally we need to disable SPI Firewall to allow direct connection from R1 to R2:
To allow traffic form R2 to access the R1 network we need to add a route for it, but before we can do so we need to clarify which interface refers to which physical connection:
We then use this to add a route from 192.168.2.x to 192.168.1.x devices:
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 vlan1 default Rl 0.0.0.0 UG 0 0 0 vlan1
I stripped the other entries from route.
The command for adding are:
route add -net 192.168.1.0 gw 192.168.1.1 netmask 255.255.255.0 dev vlan1 route add default gw 192.168.1.1 netmask 255.255.255.0 dev vlan1
The VPN connection can be made using standard OpenVPN configuration like provided by Hide My Ass.
The gateway may just use a default DD-WRT gateway configuration where it obtains an WAN ip through DHCP or whatever is required by the ISP.
The static ip of R2 can be configures under: Services->Services:
To make the 192.168.2.x network accessible from R1 a route to R2 must be added to the routing table (on this device eth1 is the WAN port and br0 is like above):
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.2.0 R2 255.255.255.0 UG 0 0 0 br0 default Modem 0.0.0.0 UG 0 0 0 eth1
The commands are:
route add -net 192.168.2.0 gw 192.168.1.100 netmask 255.255.255.0 dev br0
If any other known ip should be routed through the VPN when accessed from R1 clients then it should just be added here, since the default route of R2 would be configures to use the VPN connection once installed on R2.
A script is avaliable from e.g. Hide My Ass here but in case you have an account with them you can just login and get a command to place in the command box in the router to install it.
However, to detect if the public ip actually switched this shell script command can be used:
wget -qO- http://ipecho.net/plain ; echo
Amazon provides a low cost backup service called Amazon Glacier which a payment plan reflecting the amount of data that you store with a price in the range of $ 0.01 per GB. However beware of the other costs for requests and especially the fee related to requesting and downloading data from the remote storage.
It might not be strait forward to calculate the actual cost but with the Amazon calculator it is possible to give a pretty good estimate. It roughly seems like the cost of retrieving your data matched what you pay a month to store it.
The service is available through the Amazon Web Services interface where you can signup and joint the service.
Using Amazon Glacier is pretty easy on Windows through e.g. FastGlacier or on Mac with Arq. However, if you are running Linux, in my case Gentoo, with no desktop then the number of clients to choose from is very limited when it comes to being able to sync folders without having to re-upload it all. I found a few options mainly on github.
I found the project mt-aws-glacier project which seemed to do the job.
Synchronisation can be done with a config file that contains the essentials like:
key=GLACIER_KEY secret=GLACIER_SECRET_KEY region=us-east-1 protocol=http dir=/mnt/disk/Photography vault=photography journal=/mnt/disk/journals/photography-journal.log concurrency=10
and then using it with mtglacier like:
mtglacier sync --delete-removed --replace-modified --new --config=configs/photography.cfg &>logs/photography.log &
This will sync the /mnt/disk/Photography folder with vault ‘photography’ and store synchronisation data in the photography-journal.log file. This log file can be reconstructed but it may be easier (and cheaper) just to store it in e.g. amazon S3 since it is relatively small. This can be done with ‘s3cmd’ which also is able to sync one or more files. The following command syncs the journals folder to a remote vault in S3:
s3cmd sync /mnt/disk/journals/ s3://journals
The Bonjour service that Apple AirPlay uses to discover devices is limited to only work on a single network (subnet). However, in a home network with multiple subnets and or routers AirPlay wont work out of the box.
Here is an example of such a network:
The challenge is to get two apple devices to talk together when one is connected to router 1 and the other connected to router 2. To enable this one has to take a look at the mechanism that Bonjour uses for discovery namely multicast DNS (mDNS).
In my case the routers I used were installed with DD-WRT which is a custom firmware but it didn’t come with anything that could allow me to parse do multicast between my LAN (br0) and WAN (vlan1/[vlan2]).
But I can across this post by Darell that gave a good description of whats needed. Essentially he describes how to compile ‘mdns-repeater’ which is a small tool that can do mDNS between two interfaces in the DD-WRT router.
He also lists Tildesoft.com Bonjour Browser, a useful tool for inspecting Bonjour messages.
Putting the mDNS repreater to work on a DD-WRT device with no space avaliable for storing the program can be achieved through the startup or firewall scrips like:
wget -O /tmp/mdns-repeater http://192.168.0.1/mdns-repeater && chmod +x /tmp/mdns-repeater && /tmp/mdns-repeater br0 vlan1
The somewhat hidden feature “Guided Access” lets you restrict the access to the iPad by requiring a pass code. It is possible to restrict hardware buttons, touch screen touch area and auto rotation.
Here is a solution that allows synchronization (mirroring) of a sFTP folder with a local folder. The solution provided here uses the free WinSCP program. An alternative to this approach could be the paid software GoodSync which is fairly easy to use.
Just use the installer for Windows and select custom install and check the add to PATH variable in the installer when the tab shown below appears.
Start WinScp after the installation completes and create a new session. This session must be stored with all transfer settings and password.
First enter host name, user name and password. Then click the advanced button:
In the advanced dialog change the drop-down for UTF-8 encoding filenames to “On”. This is needed to make Danish characters “ÆØÅæøå” show correctly on the computer that fetched the files.
Finally, save the session by clicking Save As…”. The name entered here “firstname.lastname@example.org” is the name that will be used later in the sync script.
WinScp needs a sync script that lists the commands and settings it must use to sync the remote sFTP path to the local directory. Below is shown a script “script.bat”:
# Automatically abort script on errors option batch abort # Disable overwrite confirmations that conflict with the previous option confirm off # Connect using a password # open sftp://user:email@example.com -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" # Connect using stored connection open "firstname.lastname@example.org" # Force binary mode transfer option transfer binary synchronize local -delete -mirror C:\sync-tmp / # Disconnect close exit
Note that the script references two settings that must be customised upon re-use.
Note that the script contains a comment which lists the case where a session is opened using a hostkey instead of a stored password.
To make it easiere to run the sync script a wrapper batch file can be created “do-sync.bat” that can look like this:
"c:\Program Files (x86)\WinSCP\WinSCP.com" /console /script=sync.bat /log=sync.log
The batch script just calls WinScp (without starting a new application, change .com to exe to do so) with the sync script and also sets a bath to a log file that it uses.
The do-sync.bat file created in the previous step can now be used in a standard Scheduled Task in Windows to setup a recurring task for fetching an update daily/weekly or …
For instructions see the guide from Microsoft.
This ExifTool is a nice command line based tool that allows read and write of properties from Exif an others. It can easily be used in the shell to e.g. collect information about images or just to list all properties.
The tool can be used with no arguments like:
resulting in the output:
Artist : Kenneth Lausdahl Exposure Time : 30 F Number : 9.0 Exposure Program : Manual ISO : 100 Exif Version : 0230 Date/Time Original : 2012:12:12 19:07:19 Create Date : 2012:12:12 19:07:19 Shutter Speed Value : 30 Aperture Value : 9.0 Exposure Compensation : 0 Max Aperture Value : 4.0 Metering Mode : Multi-segment Flash : Off, Did not fire Focal Length : 67.0 mm Sub Sec Time Original : 01 Sub Sec Time Digitized : 01 Focal Plane X Resolution : 4438.356164 Focal Plane Y Resolution : 4445.969125 Focal Plane Resolution Unit : inches Custom Rendered : Normal Exposure Mode : Manual White Balance : Auto
If only a single property is desired then this argument can be used to just extract the date from when the photo was taken:
exiftool IMG_0001.jpg -EXIF:DateTimeOriginal
When using this tool to sort some pictures, mainly removing duplicates, I came a across the small tool tag which allowed me to tag files in Mac from the terminal. This could then be used in combination with the ExifTool for marking duplicates.
tag -a IMG_0001.jpg