Skip to content

Instantly share code, notes, and snippets.

View Hackbard's full-sized avatar

Hackbard Hackbard

View GitHub Profile
require 'restclient'
require 'fileutils'
@base_url = ENV['FLASHAIR_URL'] || 'http://192.168.1.66'
@target_dir = ENV['FLASHAIR_SYNC_DIR'] || '~/FlashAirSync'
def get_dir(root)
puts "Getting dir #{root}..."
res = RestClient::Request.execute(
method: :get,
#!/bin/bash
URL="http://doxieflashair.local"
DIRS="/DCIM/100DOXIE"
list () {
curl -s "${URL}/command.cgi?op=100&DIR=${1}" \
| awk 'BEGIN { FS=","; OFS="/" } /.+,(.+,){3}/ { print $1,$2 }'
}