Skip to content

Instantly share code, notes, and snippets.

View mslinn's full-sized avatar

Mike Slinn mslinn

View GitHub Profile

Keybase proof

I hereby claim:

  • I am mslinn on github.
  • I am mslinn (https://keybase.io/mslinn) on keybase.
  • I have a public key whose fingerprint is E269 08BF D20E A148 8E61 5363 9AE2 9594 8138 5F44

To claim this, I am signing this object:

@mslinn
mslinn / Upgrade to Ubuntu 20.04 Focal on WSL (aka WSL1) and WSL2 instructions.md
Last active April 29, 2021 21:05
Upgrade to Ubuntu 20.04 Focal on WSL1 and WSL2
  1. Display whether you have WSL1 or WSL2 by typing wsl --list --verbose into a PowerShell prompt, like this:
    PS C:\Users\mslin> wsl --list --verbose
      NAME      STATE           VERSION
    * Ubuntu    Running         1
    
    The above shows that a machine has WSL1 installed.
  2. Ignore this step if you have WSL2.

    The default Ubuntu sleep command does not work on WSL1. sleep must work properly in order for the upgrade to succeed.
@mslinn
mslinn / toWebp
Last active August 16, 2020 23:54
#!/bin/bash
# Convert all images to webp files in place and update HTML, CSS and SCSS to suit
# Usage: toWebp directory|imageFileName
# Example: toWebp . # convert images, html, scss & css in current directory tree
# Example: toWebp images/blah.jpg # just convert 1 specific image
shopt -s extglob
export CMD="cwebp alpha_q 10 -exact -lossless -m 6 -short -q 100 -z 9"
@mslinn
mslinn / newPost
Last active September 5, 2020 12:59
Make new Jekyll draft post
#!/bin/bash
# This bash script will setup a new HTML Jekyll draft blog post and open it for editing in Notepad++
#
# See https://www.mslinn.com/blog/2020/08/16/new-jekyll-post.html
#
# Original by Katie Harron - @pibby from https://gist.github.com/pibby/6911493
# Modified by Mike Slinn - @mslinn
# - added length checks for title and description
# - added reprompt for when length check fails
@mslinn
mslinn / restartXFCE4
Last active August 19, 2020 19:18
WSL2 XFCE4 setup
sudo apt install xfce4 xfce4-terminal xubuntu-desktop
@mslinn
mslinn / .wslconfig
Last active June 12, 2020 18:00
Mitigate WSL2's memory problems
# See https://github.com/microsoft/WSL/issues/4166
[wsl2]
memory=6GB
swap=0
localhostForwarding=true
@mslinn
mslinn / .bash_aliases
Last active June 15, 2020 16:17
Starts XFCE4 or some other Xorg app
alias dropCaches='su - -c "sync; echo 3 >/proc/sys/vm/drop_caches"'
alias dropCaches1='echo 1 | sudo tee /proc/sys/vm/drop_caches'
@mslinn
mslinn / .profile
Last active June 26, 2020 00:46
Start XFCE4 on WSL2
# Put the .xlaunch files here: %AppData%\Microsoft\Windows\Start Menu\Programs\Startup
# which is: '/mnt/c/Users/Mike Slinn/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup'
# Or the system startup folder
# "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp"
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
export LIBGL_ALWAYS_INDIRECT=1
#sudo /etc/init.d/dbus start &> /dev/null
startxfce4 &> /dev/null &
@mslinn
mslinn / ubuntu-20.04-fix
Last active May 25, 2020 10:59
Fixes broken upgrade to Ubuntu 20.04 on WSL 1
#!/bin/bash
# Fixes broken upgrade to Ubuntu 20.04 on WSL 1
# Run after do-release-upgrade fails
# From several posts on https://github.com/microsoft/WSL/issues/4898
sudo mv /bin/sleep{,-}
sudo touch /bin/sleep
sudo chmod +x /bin/sleep

Greasing the Skids: Building Remote Teams

In the wake of the virus that-must-not-be-named (which most people misname anyway), it seems like everyone and their cat has posted some sort of opinion or how-to on making remote work, work. This is a good thing! Working remotely, particularly full-time, is hard! I've done it for my entire career (aside from an odd 14 month office period in the middle that we shall not speak of), but more relevantly, for the past two years I've been responsible for building, managing, and enabling an entirely remote team, distributed across nine timezones. Remote teams don't just happen by installing Slack and telling everyone to work on their couch: they require a lot of effort to do correctly and efficiently. But, done right, it can be a massive multiplier on your team efficiency and flexibility.

Here's how we do it. I'm going to attempt to structure this post more towards management than engineering, and so I apologize in advance if I assume terminology or knowledge which