Skip to content

Instantly share code, notes, and snippets.

View RobertAKARobin's full-sized avatar

Robin (Robert) Thomas RobertAKARobin

View GitHub Profile
@RobertAKARobin
RobertAKARobin / screenshots.md
Last active February 27, 2024 20:22
Chrome screenshots

Take screenshots in Chrome without an extension

These instructions also work on Microsoft Edge (which is based on Chrome).

  1. On any page, press Ctrl + Shift + J (On Mac, Cmd + Shift + J)

    This opens a new window containing Chrome’s "developer tools":

    Screenshot 2024-02-27 at 2 09 12 PM

@RobertAKARobin
RobertAKARobin / images.md
Last active February 28, 2024 19:51
Robin's easy image/webpage optimization tips

Robin's easy image/webpage optimization tips

For people who can't code good and want to learn to do other stuff good too.

Browser DevTools

You can use your browser's built-in Developer Tools (DevTools) to see how well your webpage performs.

In Chrome or Edge:

  1. Open a Private or Incognito browser window.
@RobertAKARobin
RobertAKARobin / evan.vba
Created February 8, 2023 17:04
Evan's stuff
Function GetFirstEmptyCell(Direction As String, StartRowIndex As Integer, StartColIndex As Integer) As Range
Dim CurrentRowIndex As Integer, CurrentColIndex As Integer, CurrentCell As Range
CurrentRowIndex = StartRowIndex
CurrentColIndex = StartColIndex
Do While True
Set CurrentCell = Cells(CurrentRowIndex, CurrentColIndex)
If IsEmpty(CurrentCell.Value) Then
@RobertAKARobin
RobertAKARobin / scorp_tax.md
Last active January 13, 2023 17:20
How should the 2022 tax forms for a single-person S-Corp look? An example.

How should the 2022 tax forms for a single-person S-Corp look? An example.

I'm a contractor in Minnesota with a single-person LLC. I was gobsmacked by the size of my taxes. Someone recommended filing as an "S-Corp" instead of filing as an individual, in order to not pay self-employment tax.

How, though? This is discussed in lots of blog/forum/Reddit posts, and the answer everyone gives is, "Hire a CPA."

But I like knowing how things work. This is my attempt at crunching the numbers. Note: I have no background in accounting/finance.

Meet our test subject

@RobertAKARobin
RobertAKARobin / safari.md
Last active July 8, 2024 11:29
Safari's date-picker is the cause of 1/3 of our customer support issues

Safari's date-picker is the cause of 1/3 of our customer support issues

...and obviously we're building a workaround. But I'm absolutely flabbergasted that a standard <input type="date"> HTML field, in a standard browser, from a company that bases its reputation good design, could be so dreadful.

The context

I'm the developer for a startup that sells a genetic test to recommend medications for high blood pressure. For medical reasons we need to know our customers' birth date. Most of our customers are in their 60s or older. We've found that many of them use iPads or iPhones. And they're the ones who complain to our customer support that our site is unusable.

The problem

@RobertAKARobin
RobertAKARobin / denolint.md
Last active December 15, 2022 18:26
Hot take: The biggest roadblock to Deno being used for serious business is Deno Lint

Yes, it's cool and all that it's "blazing-fast". And for brand-new projects with small teams, it's probably totally sufficient. But IMO it's one of the biggest roadblocks to Deno being used for Serious Business.

Having robust linting/styles rules is crucial for robust development teams. All the established companies for whom I've worked spent years honing their ESlint rules. But most of these rules have no Deno equivalent. You can only replace ESlint with Deno Lint in fairly simple use-cases, and can't really use ESlint on Deno projects (despite my best efforts).

Even though Deno is great, even though the code "works", the inability to granularly enforce styles across a development team is a deal-breaker. Honestly the fact that the Deno team kind-of reinvented a wheel unnecessarily with Deno Lint feels like NIH (Not Invented Here) Syndrome, which is super disappointing given the respect I have

@RobertAKARobin
RobertAKARobin / o365.md
Last active November 18, 2022 20:45
Rackspace to Office 365

As of yesterday we're fully off Rackspace and onto Microsoft-direct Office 365! Our solution was:

  1. Through Rackspace's Office 365 page, buy Rackspace-managed Office 365 licenses for all the users. These show up in 365 Admin as "Reseller" licenses, as opposed to licenses purchased directly from Microsoft which show up as "Commercial direct".

  2. Use Rackspace's email migration tool (which is actually BitTitan MigrationWiz reskinned for Rackspace) to migrate all of the Rackspace/Hosted Exchange addresses to 365. This tool comes bundled with Rackspace-managed 365 licenses, but not Microsoft-direct licenses.

I tried 4000 ways of migrating with Office 365's built-in migration tool and got nowhere, and Rackspace's support was no help. If you look around you'll see that BitTitan is recommended pretty much universally for this. It's fantastic that Rackspace's 365 licenses bundle it.

Note that it seems once you've migrated a mailbox, if you migrate again then BitTitan only p

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RobertAKARobin
RobertAKARobin / bounce.scss
Created July 6, 2021 08:01
SCSS bounce mixin
@use 'sass:map';
@use 'sass:math';
@function roundTo($num, $places: 2) {
$factor: 100 * $places;
@return math.round($num * $factor) / $factor;
}
@mixin bounce(
$acceleration: null,
@RobertAKARobin
RobertAKARobin / animations.md
Last active September 11, 2023 16:29
Which web animations are expensive and which are cheap?

Which web animations are expensive and which are cheap?

You can add a lot of polish to a website or app with animations and transitions. Some animations can be built in two seconds with a single line of code. Others take days, and still others have to be hand-drawn by an actual animator. How do you tell which is which?

Skip to examples of "cheap" animations

(Note to developers: The examples are all simple hand-written SVGs, animated with CSS. Click on an image to open it in a new tab, and then "view source.")


What makes animations "expensive"?