Scott Hanselman

Try time-boxed panics

March 09, 2021 Comment on this post [3] Posted in Musings
Sponsored By

panicMy mom is very clever and thoughtful and when I was in my early teens and easily overwhelmed and generally freaking out or panicky she'd say, "feel it. Be here. What is your body telling you. Freak out fully but put a time limit on it."

This idea of "time-boxed freak outs" has always stuck with me. A few times a year I get overwhelmed. I think we all do to some extent. Often I'd try to fight it, don't cry, don't get overwhelmed.

But I remembered what my Mom said and I started being present in the freak out. I'd set a timer for 10 or 15 minutes and REALLY own it. Get upset, cry, and not feel bad about it.

I deserve the release and by time-boxing it, it allowed me to own it and accept it. I can ramp up, and then ramp down. I've found this to be far more healthy than trying to swallow feelings and hold it in. Sometimes it needs to be OK to go and cry in your car in the parking lot.

Disclaimer: I am not a doctor. I'm a random person and this is my random blog. This advice works for me and has worked for others, but know yourself and talk to a therapist if you are having uncontrollable panic attacks or feel unsafe. If this doesn't sound helpful, be present and be safe.

I tweeted about this idea and found a number of replies that also found this technique helpful. Here are some anonymized quotes:

“time boxed panic” I love it. Don’t skip the feelings. You can’t. You just defer them often to disastrous results. Sit with the discomfort a while. The way out is through.

and

Great advice. For some reason, we have been taught to suppress emotions, not to let things get to us and to not panic. And unfairly, men in particular have been encouraged not to show emotion. But it is a natural human response. Give yourself permission to feel & time box it.

and

This is a phenomenal idea. I would add, if you could add a few more minutes, take a walk away from whatever is stressing to clear your head. Sometimes being away from what is causing the stress can help as a reset.

and finally

You don't even have to cry or freak out. Just give yourself a time box to sit, stare, and clear your mind. No phones, no distractions. We have too much swirling in our heads.

Again, as with all random internet advice, you are under no obligation to do anything you don't feel is safe for you. However, some have found this helpful. I also recorded a TikTok about it that is just 1 minute long:

image

I hope it helps you. Be well!


Sponsor: Simplify code, reduce costs, and build faster without compromising the transactionality, scale and flexibility you need. Fauna - a global serverless database for all your applications. Learn more!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Penny Pinching in the Cloud: Azure Static Web Apps are saving me money

March 04, 2021 Comment on this post [9] Posted in Azure
Sponsored By

I've long run a few dozen websites in Azure and while I've long noticed people (frankly) wasting money by having one Azure App Service (a Web Site) per Azure App Service Plan (a VM) I tend to pack them tight.

A Basic 1 (B1) Azure App Service running Linux is around $13 a month but has nearly 2 gigs of RAM. Up that to about $26 a month and you've got 3.5 gigs of RAM and 2 Cores AND 10 gigs of storage. Use ALL that RAM. Max out that storage - use the resources you have paid for. If you hit up against a limit you can always add more and scale up. Run those boxes hot, you paid for them!

While my blog and podcast and main site run on Azure Premium SKUs (and are fast and it's worth it) I have a dozen little one pagers, brochureware sites, and toys like https://www.keysleft.com/ and I've managed them all in an App Service as well. But they are static sites. They are nothing sites...so why do I need an App Service? It's overkill.

Turns out Azure Static Web Apps are a lovely thing and they are FREE while in Preview. It's great for static sites, sites made with static site generators, or Jamstack sites with serverless functions behind them.

So I converted a bunch of my little sites to Azure Static Web Apps. Took maybe 90 minutes to do 8 of them as seen below.

Azure Static Web Apps

Since the code for these sites was already in GitHub, it was very easy to move them.

For example, the code for the KeysLeft site is at https://github.com/shanselman/keysleft and Azure Static Web Apps has a GitHub Action that easily deploys it on every commit. It's butter. It's created for you but you can see the generated GitHub Action as it lives alongside your code.

Azure Static Web App Static Site

The docs are clear and it works nicely with Vue, React, Angular, or just regular HTML like my son's Hamster Blog. https://www.myhamsterblog.com/

As it's in Preview now it's free, and I'm sure it'll be super cheap when it goes live. I have no idea how much it will cost but I'll worry about that later. For now it's allowed me to turn off an entire Azure App Service and replace it with Azure Static Web Apps.

They also support custom domains and they automatically make and assign you an SSL cert. My only complaint is that there's no easy support (today) for apex domains (so all mine have www. as CNAMES) but you could proxy it through a free Cloud Flare account if you really want.

Check it out, I suspect you have a site right now that's either generated or just static and this could save you some money.


Sponsor: Protect your apps from reverse engineering and tampering with PreEmptive, the makers of Dotfuscator. Dotfuscator has been in-the-box with Microsoft Visual Studio since 2003. Visit preemptive.com/hanselminutes for a professional-grade trial.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Don't forget about the GitHub Command Line

March 02, 2021 Comment on this post [6] Posted in Open Source
Sponsored By

I spend so much time at the command line using the Windows Terminal. Then I spend a ton of time using git at the command line. But then I ALT+TAB over to GitHub and mess around in the browser.

Why have I been sleeping on the GitHub CLI? - there's a command line interface for GitHub!

I installed with "winget install GitHub.cli" but you can get it from https://cli.github.com if you like.

Then you run gh auth login once:

gh auth login
? What account do you want to log into? GitHub.com
? What is your preferred protocol for Git operations? HTTPS
? Authenticate Git with your GitHub credentials? Yes
? How would you like to authenticate GitHub CLI? Login with a web browser

Now you've got a new command "gh" to play with!

I went over to one of my local git clones for the Hanselminutes Podcast website and I can now list the open Pull Requests from the command line!

Open PRs on GitHub

Here's the real time saver that Dan Wahlin reminded me about: gh repo create!

> git init
Initialized empty Git repository in D:/github/ghcliblogpost/.git/
> gh repo create
? Repository name ghcliblogpost
? Repository description This is a test for my GH CLI Blog post
? Visibility Public
? This will add an "origin" git remote to your local repository. Continue? Yes
✓ Created repository shanselman/ghcliblogpost on GitHub
✓ Added remote https://github.com/shanselman/ghcliblogpost.git

Fantastic! You can even gh issue create!

gh issue create

Creating issue in shanselman/hanselminutes-core

? Title This is a test issue
? Body <Received>
? What's next? Submit
https://github.com/shanselman/hanselminutes-core/issues/219

Checking out a Pull Request is a great time saver as well. Go check out http://cli.github.com/ and see how it can help you today!


Sponsor: Protect your apps from reverse engineering and tampering with PreEmptive, the makers of Dotfuscator. Dotfuscator has been in-the-box with Microsoft Visual Studio since 2003. Visit preemptive.com/hanselminutes for a professional-grade trial.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Crowbits are Electronic Programmable LEGO Compatible Blocks for STEM Education

February 25, 2021 Comment on this post [3] Posted in Reviews
Sponsored By

CrowBits from ElecrowLate last year I blogged about the Elecrow CrowPi2 Raspberry Pi Laptop. The folks at Elecrow are great and I've used their original CrowPi many times with the kids at and talks. None of these links are affiliate links and I am getting no kickbacks from the company - I'm just a fan and own two of their products.

As such I was excited to see their new Kickstarter called CrowBits. These are magnetic, programmable, electronic blocks that are also LEGO element compatible, which as you likely know, is a huge plus for my family. I've blogged a lot about STEM toys before, usually at Christmas, but this is a lovely spring surprise!

The devices are ESP32, Arduino and Micro:bit compatible, and there's over 80 of them. 30 of them need no programming. The whole system has a Scratch 3.0 software sitting on top, so my kids and I are already familiar with how to program these. If you're not familiar, MIT's Scratch is a visual block language that abstracts away the text aspects of programming for visually nested blocks. It's very intuitive.

Strong ability to expand

Since the people at Elecrow have successfully delivered on all their previous KickStarters and I'm personally holding both CrowPis from those Kickstarters, I have high confidence in their ability to deliver the CrowBits.

image

Even better, I'm seeing in the comments on the Kickstarter that the company is aiming to allow their programming system to run on the Raspberry Pi CrowPi devices I already own, so that's a bonus that it'll all work together.

Go check it out https://www.kickstarter.com/projects/elecrow/crowbits-electronic-blocks-for-stem-education-at-any-level


Sponsor: The No. 1 reason developers choose Couchbase? You can use your existing SQL++ skills to easily query and access JSON. That’s more power and flexibility with less training. Learn more.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Fix for Elgato Key Light not found by Control Center

February 23, 2021 Comment on this post [7] Posted in Bugs
Sponsored By

Elgato Control CenterSometimes blogging means lots of long form essays that take weeks to write and drop lots of wisdom.

However, many times blogging is just keeping track of a fix for a nagging problem. There may just be 5 or 6 of us with this issue, but if you're that person, this blog post is for you! Welcome to the solving of the issue you just googled for.

I recently bought an Elgato Key Light, and when I purchased it I did not realize that it did not have any external controls. You can only control the light with Wi-Fi and remotely. Personally I think that's a product flaw, this means I'm always going to have to be dependent on their software, and I can't just turn the thing to another level or color with a button.

The biggest issue with this light - and other picky IoT devices - is that it doesn't like my network. It happens to be the one and only device on my Ubiquiti network that doesn't seem to want to get along with the others in the house. It uses multicast DNS in the form of Apple's weirdo Bonjour service to broadcast itself, and it's notoriously hard to get the Elgato Control Center software to find the light. I know it's on the network, I can see its IP.

There's lots of blog posts with folks trying to solve this issue, and if you found your way to this blog post I figure that you've already done the obvious things like opening the firewall, turning on multicast DNS at the router level, and now you're just sick of it.

Here's my brute force solution that made my Key Light show up in Control Center.

First, I'm assuming a few things:

  • That you got the Elgato Key Light on to your network and you can find its IP Address.
  • That you installed the Elgato Control Center software on your PC

I put my Settings.xml file in this gist but the salient points are the SerialNumber and the IpAddress. You'll find the Serial Number on a sticker on the back of the light. You'll find the IP address in your router's IP table.

My Elgato Key Light's IP Address

Go to this folder on your PC

C:\Users\YOURNAME\AppData\Roaming\Elgato\ControlCenter

Make a copy of the settings.xml in that folder so you don't blame me with this whole affair goes horribly wrong.

This is not the complete settings.xml, again that's in the gist, but this was the missing piece for me.

<Accessories>
<Accessory>
<Name>Elgato Key Light Air E424</Name>
<UserDefinedName />
<UniqueID>Elgato Key Light Air E424 (3C:6A:9D:15:5E:B6)</UniqueID>
<IsHidden>false</IsHidden>
<HostName>elgato-key-light-air-e424</HostName>
<IpAddress>192.168.1.44</IpAddress>
<DNSSuffix>localdomain</DNSSuffix>
<ServiceType>_elg._tcp</ServiceType>
<Manufacturer>Elgato</Manufacturer>
<Model>Elgato Key Light Air 20LAB9901</Model>
<DeviceType>200</DeviceType>
<LightStripIsTemperatureColorSelected>false</LightStripIsTemperatureColorSelected>
<DeviceSettingsLightStripIsTemperatureColorDefault>false</DeviceSettingsLightStripIsTemperatureColorDefault>
<SerialNumber>CW39J1A17111</SerialNumber>
</Accessory>
</Accessories>

Change the Elgato Settings.xml to include YOUR light's serial number and IP address. Start Control Center.

Elgato Control Center

 

BTW, I also found this lovely blog post from Trevor Sullivan where he shows the Elgato Key Light internal API (on /elgato/lights) and a PowerShell Module that lets you change the Elgato Key light with script.

To be clear, this doesn't excuse not having buttons, but it's a start. Hope this helps both of you with this problem I had!


Sponsor: The No. 1 reason developers choose Couchbase? You can use your existing SQL++ skills to easily query and access JSON. That’s more power and flexibility with less training. Learn more.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.