Category: Fun

Progress On ‘Invoke-Remote’

Yup, it’s been a while since I had time to work on my little side-project “Invoke-Remote” – it’s a small collection of scripts that aims to enhance my everyday workflow with remote Windows environments.
Today I finally managed to add a missing piece: Get-RemoteFileContent.ps1 (ir-get for the lazy)
This script utilizes IO.FileSystemWatcher in order to make it possible to WAIT until a file is being created on a remote host! 🙂
(comes in handy when waiting for a certain log, lock or sync file)

param($folder, $file)
$fullpath = Join-Path $folder $file
if (-Not (Test-Path $fullpath)) {
  $env:RF_FILE_CREATED_INDICATOR = $false
  $fsw = New-Object IO.FileSystemWatcher $folder, $file -Property @{IncludeSubdirectories = $false; NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite'};
  $j = Register-ObjectEvent $fsw Created -SourceIdentifier FileCreated -Action {
  $env:RF_FILE_CREATED_INDICATOR = $true
};
while ($env:RF_FILE_CREATED_INDICATOR -eq $false) {
  Start-Sleep -Milliseconds 1000;
};
  $j = $fsw.Dispose();
  $j = Unregister-Event FileCreated
}
Get-Content $fullpath

Links:

I’m building a PhotoBox

Finally I put up some time and started building a “PhotoBox” / “PhotoBooth”. Many thanks to my brother-in-law who’s skilled enough in handcraft to make this project possible without falling apart right away 🙂

The main goal of this project is to come up with an actual use case for one of my old Nikon D2x-cameras, that otherwise wouldn’t leave the shelf at all. Everything is build around the amazing SLR Booth android app – I’ve added a little Raspberry Pi spice (people using the booth should be able to download their pictures to their mobile phones for ~ 5 minutes after they’ve taken a picture).

Once I’m done with it and everything works as I expect it to, I’ll be sharing building instructions and the source-code for the RPi extension 🙂

What is the PhotoBox made of?

  • Wood
  • Screws
  • Metal Coupler Pieces
  • Nikon D2x
  • Pixel C
  • Raspberry Pi
  • Canon Selphy Printer
  • Cables