UPDATE: this was published as a module on npm
Like in a test...
import assert from 'node:assert/strict'
import test from 'node:test'
import sideBySide from './side-by-side.js'
Like in a test...
import assert from 'node:assert/strict'
import test from 'node:test'
import sideBySide from './side-by-side.js'
class HCardPresenter { | |
// raw properties | |
#data; | |
// class consumer interface as proxy | |
#interface = new Proxy(this, { | |
get(obj, key) { | |
return obj[key] || obj.mf[key]; | |
}, | |
}); | |
// properties proxy for #data |
# uses gum: https://github.com/charmbracelet/gum | |
gitclean() { | |
DIRTY=$(git clean -Xdn | sed 's/Would remove //g') | |
gum style \ | |
--foreground 196 --border thick --border-foreground 88 \ | |
--margin "1 2" --padding "1 3" "$DIRTY" | |
gum confirm "🧹 Delete these?" \ | |
&& git clean -Xdf \ |
/* just webkit, 'cause yeah... */ | |
@-webkit-keyframes wobble { | |
0% { -webkit-transform: rotate(0deg); } | |
20% { -webkit-transform: rotate(2deg); } | |
50% { -webkit-transform: rotate(-2deg); } | |
100% { -webkit-transform: rotate(0deg); } | |
} | |
.wobble { -webkit-animation: wobble 5s infinite; } |
(specify your favorite flavor if you're not ready for 1.9.3):
$ rbenv install 1.9.3-p0
to rebuild rbenv's shims, when you install a new system system gem with a binary (like rake
):
$ rbenv rehash
set a global version of Ruby to be used (instead of your system Ruby):
BEGIN MESSAGE. | |
WeFUkTWPAZhsjin wU2caGSa28CMuiV 8QSAozTzd6qds7Q IkI7hFsQUkddZVA | |
jCFMT2fiwBR9902 msckGKe2q17TCKq 6Xr2MZHgg4NizN6 ArXZTHJ1Jm91lsq | |
OT0FUZD6dBx2oCj AYMCxCKf7mgoV7v B8bJ3yYcDhuUvwo mKo7W5PR5KoscdY | |
gCB227ijRIdAlmX cOiaWiDyCmxtLST YM5b82IP. | |
END MESSAGE. |
My SmartThings multisensor is a great little piece of technology. It reports, in real time, motion, temperature, and open/close state of my back door. The iOS app is slick, too, but I wanted a way to view it from my computer and have access to historical data.
Enter Dweet and Freeboard from Buglabs.
There's actually no setup required on Dweet (but be sure to check out their nifty demo). It just starts eating data and making it available for use via HTTP/JSON!
javascript:(function()%7Bvar%20d%3Ddocument%2Cs%2Ce%3Bvar%20el%3Dd.getElementById('snpy')%3Bif(typeof%20Snoopy!%3D'undefined')%7BSnoopy.toggle()%3Breturn%7Delse%20if(el)%7Bel.className%3D%2Fclosed%2F.test(el.className)%3Fel.className.replace('closed'%2C'')%3Ael.className%2B'%20closed'%3Breturn%7Ds%3Dd.createElement('link')%3Bs.setAttribute('href'%2C'http%3A%2F%2Fsnoopy-assets.allmarkedup.com%2Fsnoopy-min.css')%3Bs.setAttribute('rel'%2C'stylesheet')%3Bs.setAttribute('type'%2C'text%2Fcss')%3Bd.getElementsByTagName('head')%5B0%5D.appendChild(s)%3Be%3Dd.createElement('script')%3Be.setAttribute('src'%2C'http%3A%2F%2Fsnoopy-assets.allmarkedup.com%2Fsnoopy-min.js')%3Bd.getElementsByTagName('body')%5B0%5D.appendChild(e)%7D)()%3B |