Search
×
press ESC to close

PowerShell has some functionality that can help in pre-processing data by grouping and aggregating. If you are using ImportExcel this might be useful to pre-aggregate the results prior to an Excel workbook. If you are working with PowerShell and needing to do some quick measurement of objects, maybe this will be useful.

tech development powershell 

Windows users, nice little win for making the great git-town tool even more accessible. ๐ŸŽ‰

  • install scoop: iwr -useb get.scoop.sh | iex
  • scoop install git-town

This is one of my favorite tools for git workflow. If you use GitHub flow to keep a simple workflow, it’s a life saver.

For example, on a branch and need to start a new bit of work to keep your commits atomic? switch to master > stash pending work > pull latest with rebase > create new branch > push branch to remote OR git town hack feat/tacos. Need to squash commits and ship to master? git town ship What about prune all those remote branches that have been merged? git town prune-branches This is one of my favorite git productivity tools (and it’s written in Go ๐Ÿ‘ so cross platform and fast)

tech development git go 

Visual Studio Code has a pretty great way to browse through themes by just selecting installed themes and using arrow keys to preview without apply. However, browsing those themes isn’t quite so good, as you need to install to see the changes.

Ran across [Vscode Themes](https://vscodethemes.com/ https://bit.ly/2NHNsMW “Vscode Themes”) which provides a really nice experience if you feel like changing things up on your editor.

til tech visual-studio-code 

After using Windows versions of launchers that tried to emulate Alfred, I finally took the plunge and bought Alfred’s Powerpack. The buyer remorse of paying > $60 on a “shortcut” app hasn’t really set in as I’m seeing such a wealth of great features that I think the gains as a developer and shortcut aficionado will be well worth the cost in my workflow. So far, highly recommend. The best part for me is the easy plugging in of bash/pwsh scripts to execute on demand for quick productivity tasks without having to navigate and open it up in the terminal.

Alfred Workflows

tech macOS alfred 

Here’s a cool way to visualize runspaces and how they work asynchronously.

$IndentLevel = 2
Get-Random; @(1..100) | ForEach-Object -Parallel { 
    $i = $_
    Start-Sleep -Milliseconds (Get-Random -Minimum 100 -Maximum 1500)
    "{0,$($i * $using:IndentLevel)}" -f $i | Write-Host
}

The random delay can help show how some tasks finish out of order. For example, running that might result in this in the console:

       4
 1
     3
   2
             7
         5
                 9
           6
                  10
               8
tech powershell snippets 

Set an environment variable export DOCKER_BUILDKIT=1 to enable a much cleaner Dockerfile output when you don’t need verbose debug level information. Reference: Buildkit

til tech docker 

brew install micro resulted in my finding what I think will be my new go to cli editor. Very impressed so far. I’ve got too many things to learn to be fluent in vim, and this cross platform cli tool might be my new best friend for more command line-fu. Micro

til tech cool-tools 
  • add dev container configuration for Go project in Visual Studio code
  • Added docker compose file
  • Add SQL Server to compose as another service.
  • docker-compose up -d
  • Attach to running container in VSCode
  • Magic โšก

Now I can open Visual Studio Code and run a go project against SQL Server, and tear it all down as I want. Gonna definitely blog on this, as it’s super cool to see this work so well.

While Docker has a steep learning curve, being able to have a full clean dev test environment with SQL Server in a local container and another Ubuntu container to run Go projects in absolutely amazing, not to mention working “inside it” with Remote Workspaces extension from Microsoft.

til tech go docker sql-server 

Migrating from Windows 10 to macOS for professional use this week. So far the most painful things have been:

  • Pretty rough experience getting displaylink to work, definitely not as plug-and-play as Windows.
  • Shortcuts! I’m a serious shortcut fanatic. The difference in control/command/alt usage on on a mac is painful to my muscle memory and coding flow. Trying to not remap to windows based keys, but it’s been hard.
  • Window management. I’ve used divvy and tried some other’s, but seriously, the lack of window snapping and aero peak is pretty glaring as a new user.

Other than that, so far have most things up and running, and forced myself to do it through Ansible to learn something new. I now know I could setup my macbook 90% of the way in minutes with Ansible, so that’s a win!

tech ansible macOS apple 

Jedi: Fallen Order has the most linear gameplay I’ve done in a while. View map, get object, run for 15 mins to get back to beginning of map. Rinse and repeat. Feels like I’m back to Skyrim and endless walking. I think Dying Light ruined me with it’s parkour and movement dynamics that made everything feel so immersive.

gaming 

Kept getting an error Incorrect syntax near the keyword 'read' when running the some updated PowerShell 7 in lambda with the dotnet3.1 sdk. Was troubleshooting loading types thinking I was having path issues.

Turns out one of these things is not like the other. ๐Ÿคฃ

set nocount on
set transaction isolation read uncommitted
set nocount on
set transaction isolation level read uncommitted

I think this explains why “error during “read”. Maybe I should have run in my Azure Data Studio session before trying serverless ๐Ÿ˜€

tech sql-server aws serverless 

GitHub Codespaces was announced today. I’ve been a believer in this for a while now, and have been on the early access testing of online.visualstudio.com. Apparently it’s renamed to Visual Studio Codespaces now, and is the same tech. Will be a while before this trickles out to be mainstream, but as an early adopter of “developer workspaces as code” it’s an exciting time.

The fact that I can now spin up with a couple text files a full development test environment, with SQL Server in Docker, a configured development environment with linting and more, and then rebuild this in a few minutes on any machine is pretty incredible.

til tech 

Finally got atomic algolia to work in CICD for my hugo blog. I’ve tried tackling this in many ways over time, but this finally just worked with plug and play ease thanks to just adding a line to the hugo build netlify.toml file.

If you want to try this out, assuming you’ve already got an algolia index, json file generated and all… then just:

  1. Setup env variables in netlify build
  2. Add the following line to your netlify production build script
echo "Starting atomic-algolia update"
npm run algolia

You should get the following output from your netlify build if everything went right. No hits to algolia if you didn’t change your indexes! ๐ŸŽ‰

3:13:47 PM: > sheldonhull.hugo@1.0.0 algolia /opt/build/repo
3:13:47 PM: > atomic-algolia
3:13:47 PM: [Algolia] Adding 0 hits to sheldonhull.com
3:13:47 PM: [Algolia] Updating 0 hits to sheldonhull.com
3:13:47 PM: [Algolia] Removing 0 hits from sheldonhull.com
3:13:47 PM: [Algolia] 156 hits unchanged in sheldonhull.com
tech blogging 

If you want to simplify keeping up with github releases instead of using email, try the GitHub slack app. Simple create a releases channel and then run these two steps:

  1. /github subscribe terraform-providers/terraform-provider-terraform
  2. /github unsubscribe terraform-providers/terraform-provider-terraform issues, deployments, statuses, public, commits,pulls

This should result in a final message saying:

This channel will get notifications from terraform-providers/terraform-provider-terraform for: 
releases

Why not use /github subscribe terraform-providers/terraform-provider-terraform releases? I’ve found that at least on mobile this fails to filter properly. For me, it ignored many filters. By doing it in two steps it worked every-time without issues.

This means you’ll now get a nice formatted slack notification of just a release, without all the extra noise of pull requests, issues, commits and more. Easy way to keep up to date with projects if you want to keep it in slack. The other way is to use the github notifications section, but personally I like the slack approach.

tech slack