home.social
  1. Prototyping test recording for for : github.com/heaths/recorded-tes

    Attribute sync or async tests using `#[recorded]` and can accept optional `TestContext` parameter. Full implementation should automatically set up HTTP transport to record or play back.

    Thoughts? Still early.

  2. @vbfox @khalidabuhakmeh an RFC is already approved and partly implemented that accomplishes some of this. We’re hoping it’s stabilized before we GA our first for Rust crates.

  3. This may be enough for us to ditch our plans of using builders over ugly nested `..Default::default()` calls for nested client options in the for rust. It wasn’t the only reason, but a significant one.
    hachyderm.io/@ekuber/113369453

  4. Speaking of searching , did you know there are qualifiers you can use on the web site?

    docs.github.com/en/search-gith

    Neither did I, despite hours of use per day on the main site, extensive use of gists, and pouring over (mostly API) docs.

    Please upvote github.com/orgs/community/disc to at least add a link to the docs like code search has on the main web site.

  5. I added support to the to “search” gists - well, filter, technically, since there are no APIs to search gists. Also adds a new view when including gists’ content in the search much like code search.

    Download github.com/cli/cli/releases/la and run `gh gist list —help` for more information.

  6. @ann3nova My old was a rock-solid system! Now I miss it. 🥹

  7. Updated my extension to view information about CODEOWNERS: github.com/heaths/gh-codeowners

    Added a new `pr` command to view all a PR's files' owners e.g., `gh code owners pr #123`

    Nice to jump back into a little

  8. We've been discussing internally and leaning toward transport-level mocking - fakes - like we do in our for : github.com/Azure/azure-sdk-for

    Basically, a struct which implements our `Policy` to be used as our transport in an already-pluggable pipeline and declares distinct `Arc<dyn Fn(..) -> impl Future<..>` fields that are mapped to endpoint calls.

    Seems the most flexible and requires no change to the client API since we already support replacing the transport.

  9. @vcsjones What's in `main` now is unsupported and, for a time, at least, largely going away. We'll move that to a `legacy` branch and move `feature/track2` to `main` for supported source. We'll be generating from , so as we migrate services over we'll generate more and more. It's still early so I don't have a timeline for GA, but anything people are using there now is already unsupported. Check out the `feature/track2` branch and our guidelines if interested: azure.github.io/azure-sdk/rust

  10. Would love feedback on mocking service clients for for : play.rust-lang.org/?version=st

    Our current design requires pulling a trait into scope, and while rust-analyzer or other LSPs makes that easy not everything uses them: azure.github.io/azure-sdk/rust

    A colleague came up with a better way I prototyped above to better demo our current public API. The only caveat seems no worse than what we have now and should affect few developers, we believe.

  11. Got most of the switches throughout the house converted or upgraded to Matter. Went with because our mechanical paddle switches already are and the aesthetics match, but damn if they aren’t big. Even with slim wire levers I had to get creative in packing all the wires behind and all around the switches in a 3 gang box.

    I sent them feedback. If companies and cram all those smarts and antennas into a watch, they can make slimmer switches.

  12. My PR was merged: will be supported out of the box in !

    I've been enjoying helix for a while, wanting to upgrade to an LSP-supported clone. I'm aware and have looked into but it seems to have as much cruft as vim that I've been using for nigh on 30 years. Still not off the table - helix is missing quite a few features for now - but I'm impressed with how much I can already do with this fast, fresh editor.

  13. @yosh all great reasons we did this in as well. Also makes spec versioning so much easier in many different ways e.g., humans can easily see when something was added or removed from the specs.

  14. As a , I like this tech I just came across via /. If adopted into more vehicles and in bike tech like my head unit this could really improve safety on the road...especially in the US where everyone is so angry and in a hurry.

    5gaa.org/c-v2x-explained/

  15. After someone in a meeting today quipped that if you leave long enough it turns to (in reference to data science and other libs turning to ), I got to wondering: why isn't it known instead as ?

  16. @ekis @[email protected] I often work with monorepos like the for . That's when git worktrees and sparse checkouts can help reduce checkout time and drive space exhaustion. Check out heaths.dev/tips/2022/06/18/red for some tips. I should probably update that to mention worktrees too, though that really just helps reduce cloning time and minimizes disk space.

    One advantage is having different copies of dependencies in different states, though I wonder how often that's a problem.

  17. Nothing like being asked to provide cross-platform support for my MSI cmdlets (github.com/heaths/psmsi) to extract the ProductCode - which is dubious since they depend on Windows-only APIs and most features would only work on Windows where MSIs can be installed - and saying you could write a simple CLI using a crate that implements OLE docs and 's proprietary compression algorithm, only to realize you already did it a long time ago: github.com/heaths/msigetprop-rs

  18. The `azd` has been available for a short while as a feature, which I recently used in github.com/heaths/azcrypto: github.com/heaths/azcrypto/pul

    It will not only install `azd`, but the dev extension for . It makes deploying resources and applications a breeze.

    I use it in azcrypto in lieu of the resource provisioning scripts I originally wrote for all of to deploy resources uniformly. This is a publicly available (near) equivalent.

  19. devblogs.microsoft.com/azure-s

    Azure Core for all our language SDKs plays a core part of our HTTP pipeline (and other protocols in some cases, like AMQP), serialization, and more. My colleague, Anne, does a great job explaining a lot of it here.

  20. New season of just parodied the red room from and I'm here for it!

  21. Now that the for has released v1.0.0, I have updated to it and released v1 of pkg.go.dev/github.com/heaths/a : a cryptography client for Key Vault and that not only makes it easier to call crypto operations but tries to first cache the public key and do public key operations locally to improve performance and help mitigate throttling.

    We have this in our other languages' SDKs but doesn't fit our design goals for , so I wrote it as a separate module.

  22. @larryosterman to clarify for others interested in or , we - including others from different departments at - have established guidelines for both service APIs (typically REST) as well as client libraries we write and generate. Our code generators follow those same guidelines.

    is designed to bridge those concepts. With the same expressive grammar, service teams have more central control (with guard rails) over both service and client code.

  23. Some of my colleagues put a lot of work into dynamic support for RESTful payloads for the for . I updated some of the samples I own and it feels idiomatic. As we convert more services to , we'll be generating model classes but Dynamic JSON will still be useful in more advanced scenarios.

    Read devblogs.microsoft.com/azure-s for more information.

  24. My github.com/heaths/azcrypto module for easy and crypto operations is now feature-complete and at parity with our other languages' crypto libraries. It now supports crypto operations locally using a JWK.

    Not likely to make it into our official azkeys SDK, but written to our same SDK guidelines.

    azkeys will GA soon, and once I upgrade my dependency I plan to GA this module.

  25. I've been working on a "business adjacent" project - as many of mine are - but for something that may one day be part of our for . Regardless of whether it gets included, I want it to feel like a first-party experience when used with our other client libraries. Given I'm part of the team, I'm coining(?) the phrase, "first-ex parte".

    See github.com/heaths/azcrypto for a cryptography client for or . It's basically the same as we have in other languages.

  26. @leffie we (mostly, my wife) know a family with an I may ask. Same platform, basically, as an . We're worried about it fitting in the garage too. I told my wife to ask the guy if he could pull his truck into her garage spot, and to make sure he knows that's not a euphemism. (He is pretty good looking.)

  27. Full and support is now available in github.com/heaths/azcrypto for . I'm consider AES support, but still researching AES in . The APIs I'm familiar with in are significantly different so it may be a while, and AES is limited to anyway.

  28. Since the for 's philosophy is thin, mostly generated clients - which I don't disagree with - I built a client atop it much like I helped drive in our other SDK languages and wrote for the SDK for .NET: github.com/heaths/azcrypto

    It's very early in development right now - supporting only sign and verify - but is an MVP enough to get some feedback from my team or anyone else who may be interested.

  29. Now sports both `lint` and `view` commands, though no auto-fix yet. There's a few scenarios I hadn't considered with how my team uses it I need to rethink how to automatically solve while keeping a generic clean-up possible as well.

  30. Maintaining a already has enough challenges. Keeping its up to date can be difficult. I started on a new extension: `gh ext install heaths/gh-codeowners`

    It does only simple linting for now but will have a fix mode for supported error types.

    See github.com/heaths/gh-codeowner for more information.

  31. Nothing like writing a extension to work around a bug in the CLI for which I've had a PR out for over 9 months waiting for one person to review it (other staffers have already), but here we are: github.com/heaths/gh-merge-json

    `gh api --paginate` may return invalid JSON, so this extension does what my PR does but within the gh ecosystem.

    Just `gh ext install heaths/gh-merge-json` and pipe paginated JSON to it to merge the JSON (mainly nested arrays) and get back valid JSON.

  32. As an avid backcountry backpacker in the Pacific Northwest, this is a great question.

    I, too, grew up in a time and place where weren't a big issue but has changed that. Now, at least, we have better options for fire. I always carry an Reactor that works at any elevation and temp and creates no embers.

    rei.com/blog/camp/no-more-camp

  33. @roguequery if you're interested in making this template...we'll, more template-like so people can just define a few replacement variables...check out github.com/heaths/gh-template. It's a extension to "fork" the template and uses templates for replacement.

    Like you, I also got tired of copypasta but also all manual replacements.

  34. @m8urnett it gets even worse for packages that will forever be stuck at 8.1: fosstodon.org/@heaths/10965440

    There are also AppCompat shims that will lie about certain file versions, which are just as clunky as Windows versions, so "feature detection" based on implemention files often won't work. It's hostile behavior toward installers, pushing people back to custom, perhaps ill-behaved installers.

  35. @robpomeroy and if people would like an example using , check out my extension: github.com/heaths/gh-projects, specifically the files under internal/cmd.

    may seem daunting at first, but you only get what data you asked for and can effectively combine multiple requests in a single fetch.

    Note: may not be the most optimized requests, but is geared for infrequent access.

    Now if only would fill out all the missing functionally for Projects V2 you find in V1.

  36. @nguerrera Unless it's changed recently, there are a few services you can connect to for free. Offhand I forget which ones, but they're in their app. This and similar reasons are why my home automation is a heterogenous mess of services that, fortunately, do all work through my hub (pre-Matter, but that may help future devices).

  37. Use the to run `gh api --paginate` and tired of having to rely on installing external tools or otherwise munge invalid concatenated JSON from all responses? Consider upvoting github.com/cli/cli/pull/5652 to hopefully finally get this PR merged that fixes the problem.

  38. @mmeier If it helps, for setting up one-off projects I made a extension that may help: github.com/heaths/gh-template

    gh extension install heaths/gh-template
    gh template clone heaths/template-golang

    You can also make your own template repos.

  39. Published another new version of my extension github.com/heaths/gh-template to clone and format template repos, now that optionally clones labels*, supports boolean expressions to condition blocks of templates, and allows for different template delimiters.

    (*One of several features I've added to the CLI itself. The extension now does it automatically with --labels when you clone.)

  40. I released a new version of my extension gh-template which can clone and format a repository template in a single command and re-prompt the user for some parameter types: github.com/heaths/gh-template

  41. Updated a couple of my own template repositories to take advantage of the github.com/heaths/gh-template extension:

    github.com/heaths/template-gol

    github.com/heaths/template-rus

    Can use falsy conditional in README to give instructions and have it templated out: