Ted Piotrowski

Code to live. Live to spend time outdoors.

Read this first

Notes on remitting Stripe Tax to the UK and EU

Screenshot 2024-07-26 at 10.57.59 AM.png

Photo by Kelly Sikkema on Unsplash

I’ve been selling access to high resolution shadow maps on shademap.app for the past few months. This is known as a digital good and is subject to tax in various jurisdictions.

I use Stripe as my payment processor which calculates and collects the appropriate tax amount during checkout based on the buyer’s location. (More info: Stripe Tax)

However, it is my own responsibility to report and surrender (remit) the collected tax money to the appropriate authorities. Here are some notes I’ve compiled on the process in the UK and EU.

Thresholds

Unfortunately, the threshold for remitting taxes in the UK and EU is $0. This means that you owe tax from your first sale.

Stripe Tax

Stripe does the tax calculation and collection for you with one caveat: it will only start doing so for a jurisdiction once you enter the appropriate tax registration number...

Continue reading →


Epinepherine - Red Rocks

Featuring: Stephen Michael Sherman

Looking up Epinepherine

5:40am - Looking up Epinepherine from the base

It was the third day of our annual trip to Red Rocks and after a leisurely climb up Algae on Parade Loni suggested that she take a rest day and Sherman and I should go do something “big” on Sunday. I think we both instantly thought about the Red Rocks classic Epinepherine (currently number three on Mountain Project’s Top 20 Classic Climbs).

Pitch 1 Ephinepherine

5:54am - On our way, pitch 1

There were a few hurdles. It’s a long route (~1600’) and November 5th is not exactly the longest day of the year. People say it’s a tricky walk-off in the dark. The pitches average about 150’ so you can’t rappel it on a single 60 meter rope. I’d never lead 5.9 trad in Red Rocks or anywhere else as far as I could remember. We told some climbing friends at dinner and the general reaction was: “It’s a long route”, which I interpreted as...

Continue reading →


Sun and Shadow Maps: Models vs Reality

During the Mapbox BUILD conference this week, something was said that gave me clarity on my vision for sun and shadow simulation. The speaker gave a demo of Mapbox GL JS v3 which includes 3D tree renderings. The speaker said that the trees were not accurate depictions because the purpose of maps is to convey information and not depict reality. The maps purpose is to let you know trees are there without specifying their height or type (oak, pine, cedar, birch, etc). Maps simplify how we represent the real world.

Rendering of trees in London in Mapbox GL JS v3

In the same sense shademap.app has been nothing more than a model of sun and shadow, more akin to a fancier version of suncalc. It models where the shadows will fall but it does not reflect reality. The reason is because the map is constructed from models. It uses an elevation model and building models.

Lets start with the...

Continue reading →


Vite JS Client Side Routing

I recently migrated from create-react-app to Vite because the initial startup and reload speeds are extremely fast. Vite helps me iterate faster on my project.

One major difference between Vite and create-react-app is that Vite does not do client side routing by default. In client side routing, any url you visit serves up your React App.tsx. You can then parse the urls in Javascript using React router and render the corresponding components for /profile or /login, etc.

Vite, however, will return a 404 for any url that’s not the root / url. So if you navigate to /profile you will get a 404 Not Found. To fix this, you can modify your vite.config.js file and serve your root App.tsx for any url matching a regex by adding the code below.

Note: You can’t serve the root for all paths /.* because your static assets will break. You will need to modify the regex to match your needs. My regex...

Continue reading →


Cloudflare Pages Node/Yarn versions

I spent an hour today debugging this error which occurs when deploying a Github repo to Cloudflare Pages:

07:50:42.633    Success: Finished cloning repository files
07:50:43.436    Detected the following tools from environment: yarn@3.6.3, nodejs@18.17.1
07:50:43.438    Installing project dependencies: yarn
07:50:44.208    ➤ YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker 👍
07:50:44.211    
07:50:44.264    ➤ YN0000: ┌ Resolution step
07:50:48.645    ➤ YN0032: │ fsevents@npm:2.3.3: Implicit dependencies on node-gyp are discouraged
07:50:52.853    ➤ YN0000: └ Completed in 8s 590ms
07:50:52.879    ➤ YN0000: ┌ Post-resolution validation
07:50:52.879    ➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden.
07:50:52.880    ➤ YN0000: └ Completed
07:50:52.880    ➤ YN0000: Failed with errors in 8s 618ms

It...

Continue reading →


Using LiDAR to map tree shadows

tl;dr; I can load LiDAR data to simulate tree shadows for any time of year, but the hardware demands and hosting costs may be prohibitive so I’m only sharing a small demo for now

Update: I can now offer LiDAR data for large parts of the planet in 1 square km blocks on shademap.app (Demo video)

Two years ago, I launched shademap.app, and since then, a common question I receive is: “Where are the trees?” It’s a valid inquiry, considering I reside in the Pacific Northwest—a region known for its towering trees that significantly affect the amount of direct sunlight a location receives.

Here are two renderings of the shadows on Bainbridge Island for July 9th at 7:09 AM. Radar clearly misses 90% of the shadows cast because it does not include vegetation. Radar only reflects off the ground (Correction: an HN user pointed out that radar does reflect off surfaces like vegetation. I assumed it...

Continue reading →


Mount Index

Mount index hourglass gully from Mount Baring

This rugged peak is impossible to miss on a clear day while driving westward on Highway 2. Its intimidating pillars of granite, rising thousands of feet into the air, are complemented by the beautiful Lake Serene at its base. A visit during the winter months is guaranteed to impress with frequent avalanches of snow roaring down its icy walls. Mount Index actually consists of three distinct summits and this blog post is about reaching the tallest but easiest of the three.

Mount index traverse around Lake Serene

Cassondra and I set out to climb it on May 20th. It was a rather hot day, with summit temps forecast at 60 degrees Fahrenheit. Ideally you want the temperatures cool for this climb because the upper route faces south east and gets baked by the sun throughout the day. We had attempted Index in April of last year but when the sun hit the upper mountain we watched avalanche after avalanche cascade down the mountain. It...

Continue reading →


Knowledge Work

IMG_7275(1).jpg

I’ve spent way too much time answering questions on stack overflow. I don’t know why. -Greggman

Recently, I think I enjoy doing house work more than programming. There’s a sense of accomplishment in finishing a task. When I set out to wash the dishes or do a load of laundry, I know that I will succeed and I can even do a decent job of estimating how long the task will take.

Knowledge work is different. Often, you can put time in for months without seeing any meaningful results. Often you throw all your efforts away if they’re not fruitful. I console myself on these occasions by telling myself I’ve learned something and even though the work is trashed, the knowledge remains.

Stack Overflow provides the type of validation that knowledge workers crave. You are given a relatively simple task and if you can finish it, expect check-marks and points in a relatively timely fashion. That’s...

Continue reading →


Tajumulco Volcano - Guatemala’s Highpoint

Cassondra, myself and my sister Ilona were invited to attend a wedding in Antigua on Saturday, March 11th and because it was a bit of a financial and time commitment to get there, we decided that we would fly in the weekend before and do some exploring.

IMG_7739.JPG

Hotel parking by trailhead

We rented a car at the airport and spent two days with a guided group on the active volcano Fuego, outside of Antigua. It was a blast but then we decided to opt for the less visited country high point of Guatemala: Tajumulco Volcano 13,739’.

IMG_7679.JPG

First views of Tajumulco from the road

We stayed at the Hotel Fuentes in San Marcos, an hour’s drive south of the volcano. The night before our hike, we did some Googling of the route, the directions to the trailhead and gathering general “beta”. We discovered a hotel near the trail with a parking lot where we could leave the car.

IMG_7681.JPG

Sporadic trail markers along...

Continue reading →


Forbidden Peak

Forbidden Peak

Late summer/early fall is my favorite season in the Cascades. The mornings are crisp but the evenings are fairly warm. You can get away with a light backpack because you don’t need to bring warm layers or serious snow gear. Eldorado, Sahale, Sherpa and Argonaut were all incredible climbs we did during this season in years past.

So after many weeks abroad, we were back in Seattle for Labor day and eager to get in at least one epic climb before the snow started to fall. Cassondra managed to secure a Saturday night permit for Boston Basin and we decided to try Forbidden Peak.

Crossing Boston Creek

Finding a way across Boston Creek

The weather was chilly, with summit temperatures forecasted to be around 40 degrees with 15 mph winds and a chance of an afternoon misting totaling 0.01mm of accumulation. It wasn’t a great forecast for standing around and belaying the 1000’ or so of climbing but we knew what to...

Continue reading →