BigFont Blog
  • Home
  • About
  • Bibliography (Work)
Shaun Luttin

Shaun Luttin

183 posts •
c#

GetEnumerator and GetAsyncEnumerator both return a new instance of an enumerator.

GetEnumerator and GetAsyncEnumerator return a new instance of an enumerator. As a result... var e1 = sequence.GetEnumerator(); var e2 = sequence.GetEnumerator(); Console.WriteLine(e1 == e2); // false!!!Corollary1: if we call e1.MoveNext(), the

  • Shaun Luttin
    Shaun Luttin
1 min read

Install and use StyleCop in a .NET or .NET Core project from the command line (without needing your whole team to do the same).

This is my workflow for using StyleCop.Analyzers in a repository, without needing my entire team to use the tool. At a high level, I install StyleCop, use it, and then remove it

  • Shaun Luttin
    Shaun Luttin
1 min read
What was it like working a four day work week for two-and-a-half years?

What was it like working a four day work week for two-and-a-half years?

It was lovely - and focused. Statutory holidays were awkward, though, because then it became a three-day workweek, which was too short. If I were to do it again, I would set it

  • Shaun Luttin
    Shaun Luttin
1 min read

Debug an IIS Express web application from VS Code.

Here is how to build, run, and debug your .NET Framework Web Application with msbuild, iisexpress, and VS Code. From PowerShell, build your app with a portable Program Database (PDB) output. msbuild ` /property:

  • Shaun Luttin
    Shaun Luttin
1 min read

Considerations for C#.NET code formatting in a distributed microservice application that spans multiple Git repositories.

The problem is...it is expensive for a company to format code manually, but it is also expensive not to format code at all. Summary from ThoughWorks Tech RadarFor as long as we

  • Shaun Luttin
    Shaun Luttin
5 min read
Push and pull files between Windows 10 and WSL2 file systems with Git.
git

Push and pull files between Windows 10 and WSL2 file systems with Git.

This shows how to push and pull files between the Windows file system and the WSL2 file system. The unrelated photo shows some integration composting we are doing at the Fernwood Road Cafe

  • Shaun Luttin
    Shaun Luttin
1 min read
Output the number of Git commits a person made each day of the year in bash.
git

Output the number of Git commits a person made each day of the year in bash.

It's the end of the year. Sometimes I want to know how many commits I made per day. This also helps me to see how many days I worked per year. (The unrelated

  • Shaun Luttin
    Shaun Luttin
5 min read

Combine git, sort, and tail to view the most changed files.

The following lets us see the top 20 most changed files in a git diff. git --no-pager diff master | sort -k3 -n | tail -20Use man sort for details on the options.

  • Shaun Luttin
    Shaun Luttin
1 min read
The A method for evaluating a potential employer.

The A method for evaluating a potential employer.

Recently I read "Who: The A method for hiring." It calls for creating a scorecard to evaluate potential employees. I thought, well, that's a good idea. I could do the same for an

  • Shaun Luttin
    Shaun Luttin
4 min read
When using TypeScript and streams in NodeJS, use the stream.Stream type until there is reason to use a wider type.
typescript

When using TypeScript and streams in NodeJS, use the stream.Stream type until there is reason to use a wider type.

It's easy to build a big ball of mud when working with technology we do not understand. Two years into a project, we found ourselves converting among typed arrays, streams, and buffers, without

  • Shaun Luttin
    Shaun Luttin
1 min read
My answers to common "cultural fit" interview questions...
career

My answers to common "cultural fit" interview questions...

This post is a work in progress. It includes my answers to common "cultural-fit" job interview questions. The image above shows the outdoor version of my home office. Note: Many of these questions

  • Shaun Luttin
    Shaun Luttin
12 min read

Navigating bash's native grep results with the Vim quickfix list.

These two commands first save the grep results to a temporary file and then populate Vim's quickfix list with the contents. $ grep FooBar -irn ./src/app > /tmp/quickfix $ vim -q /tmp/quickfix

  • Shaun Luttin
    Shaun Luttin
1 min read

Why avoid static methods?

Avoid static methods because they allow, imply and/or encourage global private state access. If the function/method does not require state, then do not use a static method. If the method does

  • Shaun Luttin
    Shaun Luttin
1 min read
wsl2

Using Graphical User Interfaces in WSL2

First on WindowsInstall XMing (or VcXsrc). Turn off Windows Defender Firewall under Public network settings. Start XMing from Windows PowerShell. & 'C:\Program Files (x86)\Xming\Xming.exe' -multiwindow -clipboard -acThe most important

  • Shaun Luttin
    Shaun Luttin
1 min read
vscode

Clear your VS Code User Session

VS Code caches a lot. That's helpful but is sometimes a pain. Here is how to clear the workspace / user session session, which, among other things, remembers your recently opened files. Bash in

  • Shaun Luttin
    Shaun Luttin
1 min read

Notes on Vim's native package manager

These are high-level notes on how to use Vim's native package manager. It has been available since Vim v8. Read the manual with :help packages. Many people use git-submodules for package management. What

  • Shaun Luttin
    Shaun Luttin
1 min read

Starting with Docker on Ubuntu in WSL 2 without Docker Desktop

These are the steps that I used to run Docker without using Docker Desktop. Ensure you are using WSL 2 from PowerShell. wsl --list --verbose If you are, then open up a bash

  • Shaun Luttin
    Shaun Luttin
1 min read
Receiving a refund from LeetCode with the help of the Better Business Bureau
assertiveness

Receiving a refund from LeetCode with the help of the Better Business Bureau

This following email thread shows how I used the Better Business Bureau to receive a refund from LeetCode. Everyone was polite, and it was a worthwhile exercise in assertive communication. The unrelated image

  • Shaun Luttin
    Shaun Luttin
4 min read
COVID-19 reentry scenarios
covid-19

COVID-19 reentry scenarios

My friends and I have been exploring economic re-entry plans. The plans seem to boil down to five alternatives. Physical distancing until vaccine (18-months). The hammer and the dance.Test everyone every two

  • Shaun Luttin
    Shaun Luttin
1 min read

Bash Kata on Ubuntu > 16.04

These are some commands that I like to run through when I am fiddling around on a Linux machine. output computer name hostname inspect network interfaces ifconfig show current working directory pwd change

  • Shaun Luttin
    Shaun Luttin
1 min read
covid-19

Helpful Things to Know for COVID-19

The authors of this page live on Salt Spring Island, BC, Canada. The page contains links to resources that we have found personally useful. Here's a great video about how to properly wash

  • Heather Pardon
    Heather Pardon
  • Shaun Luttin
    Shaun Luttin
2 min read
vscode

Allow VSCode through WSL Firewall

As far as I can tell, VSCode's Remote - WSL service connects over port `41261`. So, we can allow it through the Firewall like this: sudo ufw allow 41261 comment 'VSCODE'

  • Shaun Luttin
    Shaun Luttin
1 min read

Bash commands that are helpful to me on a daily basis and which I initially found difficult to use

I learned most of what I know about bash from The Linux Command Line by William Shotts. Find something by name and ignore a directory. find . -path ./ignoreDir -prune -o -name "findName&

  • Shaun Luttin
    Shaun Luttin
1 min read
bash

Use ssh to run a local script with arguments on a remote host.

ssh [email protected] -i rsa_private_key 'bash -s arg01 arg02' < some_script.shSee also: https://stackoverflow.com/questions/305035/how-to-use-ssh-to-run-a-shell-script-on-a-remote-machine

  • Shaun Luttin
    Shaun Luttin
1 min read
Temporarily mute/hide a specific user in a channel in the Slack web interface.
productivity

Temporarily mute/hide a specific user in a channel in the Slack web interface.

This is a JavaScript one-liner that works in the Slack web interface. // this code is a work in progress document.querySelectorAll('*').forEach(element => element.addEventListener('scroll', () => Array.from(document.

  • Shaun Luttin
    Shaun Luttin
1 min read
BigFont Blog © 2021
Latest Posts Ghost