Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
# frozen_string_literal: true
require_relative '../lib/xanview_resolve'
# Class to rsync Xanview timeagent/deploy code to various Xanview hosts
class XanviewRsyncFrom
def initialize
end
I'm trying to switch from :dalli_store to :mem_cache_store.
With :mem_cache_store, I get this:
```
Rails.cache.fetch("zone#{zone.id}_latest_event") do
Event.where(zone: zone).desc(:starts_at).for_recording_create.limit(1).first
end
=> nil
API_KEY = 'xxx'
SECRET_KEY = 'xxx'
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'cryptocompare'
gem 'binance-ruby'
@rgaufman
rgaufman / balance.rb
Last active November 30, 2021 19:02
Shows your Binance balance in GBP and BTC every hour
# frozen_string_literal: true
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'cryptocompare'
gem 'binance-ruby'
end
on iPad
1) Turn on Cursor and Keyboard on iPad
2) Turn iPad off
on MacbookPro
1) Turn off UniversalControl
2) Kill UniversalControlProcess
3) Turn on UniversalControl
on iPad
Switching on iPad Mini 6 - causes Air4 to disconnect immediately:
default 23:45:46.160490+0100 UniversalControl IDS A9E91148: Device Changed [AdvData Attrs RSSI] SF <BLE DuetSync WiFiP2P Owner ApplePay LocalDevice>, AL Screen(7)
default 23:45:52.131831+0100 UniversalControl IDS 09284383: Device Found SF <BLE Owner ApplePay LocalDevice>, Md iPad14,2, SV 340, AL Unknown(0)
default 23:45:52.148940+0100 UniversalControl IDS A9E91148/SYNC: Skipping Message Send: broadcast, local=11, remote=9
default 23:46:02.203615+0100 UniversalControl IDS 09284383: Device Found SF <iWiFi DuetSync Owner>, Md iPad14,2, SV 360.4, AL Unknown(0)
default 23:46:16.939361+0100 UniversalControl P2P A9E91148/FDF9: Skipping idle timeout due to connection assertions (1)
default 23:46:24.980106+0100 UniversalControl Stream-50085: Abort reads: kConnectionErr (Read EOF)
default 23:46:24.980155+0100 UniversalControl 50085: ### Receive failed: kConnectionErr (Read EOF)
default 23:46:24.980197+0100 UniversalControl 50085: ### Server error: kNetw
iPad 4 Logs - Successfully Connecting
default 20:03:02.201749+0100 UniversalControl 49292: Received event ID 'SYNC', XID 0x7DEFA421, 1 keys, from ri6a5ab08706
default 20:03:02.204350+0100 UniversalControl IDS AE68CF68: Receive Message: clock: '[A9E91148: 5, AE68CF68: 8]', config: [S&R: '1BDE37E5', V: ''], connDevices: [S: '4FC946A0', R: '815C0AAA', V: ''], device: [S: 'FBC83C04', R: '64BAC239', V: ''], displayLayout: [S: 'BE77F54E', R: 'E5B604C6', V: ''], srcDevice: [S&R: '00000000', V: ''], syncDevices: [S&R: '94BE4528', V: '']
default 20:03:02.204528+0100 UniversalControl IDS AE68CF68: Merge sync clock: [A9E91148: 5, AE68CF68: 7] -> [A9E91148: 5, AE68CF68: 8]
default 20:03:02.205691+0100 UniversalControl IDS AE68CF68/SYNC: Create Message (Barrier)
default 20:03:02.205890+0100 UniversalControl IDS AE68CF68/SYNC: Sending Message: broadcast, local=5->5, remote=7->8
default 20:03:02.206485+0100 UniversalControl IDS AE68CF68/SYNC: Send 'broadcast', timeout=10.00s
default 20:03:02.206593+0100 UniversalControl ID
iPad4 Logs - sleep and wake - won't reconnect
default 20:03:02.201749+0100 UniversalControl 49292: Received event ID 'SYNC', XID 0x7DEFA421, 1 keys, from ri6a5ab08706
default 20:03:02.204350+0100 UniversalControl IDS AE68CF68: Receive Message: clock: '[A9E91148: 5, AE68CF68: 8]', config: [S&R: '1BDE37E5', V: ''], connDevices: [S: '4FC946A0', R: '815C0AAA', V: ''], device: [S: 'FBC83C04', R: '64BAC239', V: ''], displayLayout: [S: 'BE77F54E', R: 'E5B604C6', V: ''], srcDevice: [S&R: '00000000', V: ''], syncDevices: [S&R: '94BE4528', V: '']
default 20:03:02.204528+0100 UniversalControl IDS AE68CF68: Merge sync clock: [A9E91148: 5, AE68CF68: 7] -> [A9E91148: 5, AE68CF68: 8]
default 20:03:02.205691+0100 UniversalControl IDS AE68CF68/SYNC: Create Message (Barrier)
default 20:03:02.205890+0100 UniversalControl IDS AE68CF68/SYNC: Sending Message: broadcast, local=5->5, remote=7->8
default 20:03:02.206485+0100 UniversalControl IDS AE68CF68/SYNC: Send 'broadcast', timeout=10.00s
default 20:03:02.206593+0100 UniversalCo