diff --git a/transfer-protocol/bin/rewrite-urls.php b/transfer-protocol/bin/rewrite-urls.php index e40204d..e36d943 100644 --- a/transfer-protocol/bin/rewrite-urls.php +++ b/transfer-protocol/bin/rewrite-urls.php @@ -70,8 +70,9 @@ echo "The --new-site-url option is required for the migrate_urls command.\n"; exit( 1 ); } - $parsed_current_site_url = WP_URL::parse( $options['current-site-url'] ); - $string_new_site_url = $options['new-site-url']; + $parsed_current_site_url = WP_URL::parse( $options['current-site-url'] ); + $decoded_current_site_pathname = urldecode( $parsed_current_site_url->pathname ); + $string_new_site_url = $options['new-site-url']; $parsed_new_site_url = WP_URL::parse( $string_new_site_url ); echo "Replacing $base_url with $string_new_site_url in the input.\n"; @@ -82,10 +83,25 @@ $matched_url = $p->get_raw_url(); $parsed_matched_url = $p->get_parsed_url(); if ( $parsed_matched_url->hostname === $parsed_current_site_url->hostname ) { + $decoded_matched_pathname = urldecode( $parsed_matched_url->pathname ); + $pathname_matches = str_starts_with( $decoded_matched_pathname, $decoded_current_site_pathname ); + if ( ! $pathname_matches ) { + continue; + } + + // It's a match! Let's rewrite the URL + $parsed_matched_url->hostname = $parsed_new_site_url->hostname; - if ( str_starts_with( $parsed_matched_url->pathname, $parsed_current_site_url->pathname ) ) { - $parsed_matched_url->pathname = $parsed_new_site_url->pathname . substr( $parsed_matched_url->pathname, - strlen( $parsed_current_site_url->pathname ) ); + // short-circuit for empty pathnames + if ( '/' !== $parsed_current_site_url->pathname ) { + $parsed_matched_url->pathname = + $parsed_new_site_url->pathname . + substr( + $decoded_matched_pathname, + // @TODO: Why is + 1 needed to avoid a double slash in the pathname? + strlen( urldecode( $parsed_current_site_url->pathname ) ) + 1 + ) + ; } /* diff --git a/transfer-protocol/married-short.html b/transfer-protocol/married-short.html deleted file mode 100644 index d0151c1..0000000 --- a/transfer-protocol/married-short.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - -

During the Write of Passage, I stubbornly tried to beat my writer’s block by writing until 3am multiple times. The burnout returned. I dropped everything and went to Greece for a week.

- - - -

- Have you seen my blog, adamadam.blog? I told a story there of how I got my Bachelor's degree, - check it out: https://adamadam.blog/2021/09/16/how-i-got-bachelors-in-six-months/ -

- diff --git a/transfer-protocol/married.html b/transfer-protocol/married.html deleted file mode 100644 index b4f62f6..0000000 --- a/transfer-protocol/married.html +++ /dev/null @@ -1,319 +0,0 @@ - -

2021 was another most intense year of my life. It was also unique: I reached almost none of the goals I set. The crazy part? I feel damn good about it.

- - - -

I declared a goals bankruptcy

- - - -

I started the year with my usual list of Big Hairy Goals. It mentioned things like starting a Master’s degree, advancing my new data scientist career, and moving to Australia. I was excited about that list. I believed I could make it all happen if I only pushed my limits a bit more.

- - - -

Things looked great at the beginning. I finished my degree with a 4.0 GPA, self-published my final paper at arXiv, and even got admitted to a Master’s in Data Analytics program at Georgia Tech. 

- - - -

However, my excitement turned into burnout when I found myself working most evenings. During the therapy, I realized I got addicted to achieving. The second I reached one goal, my back alley drug-dealing brain was already tempting me with another, as if it was saying Pssst! Hey kid! You want some goals? I clearly needed a rehab.

- - - -

I declared a goals bankruptcy and took a leap of faith into the unknown. Goodbye Master’s degree leading to a Ph.D. leading to an AI research career, goodbye learning ukulele, going to Machu Picchu, and building muscles, and goodbye the rest of the list. Welcome, life.

- - - -

It was so liberating! Every day I woke up to a refreshing buffet of options, not a daunting list of obligations. I felt more relaxed, present, and alive. I didn’t know where I was headed, and yet I still ended up learning, traveling, and exercising a lot. Replacing KPIs with joy has served me well.

- - - -

It wasn’t all smooth sailing, though. I did relapse into pressing schedules a few more times that year.

- - - -

During the Write of Passage, I stubbornly tried to beat my writer’s block by writing until 3am multiple times. The burnout returned. I dropped everything and went to Greece for a week.

- - - -

In December, I realized my calendar and my to-do lists somehow bulked again, leaving me very little time for improvising activities. I took 3 weeks off for Christmas and new year, completed 70 tasks I considered important, and removed most of the remaining ones.

- - - -

Now I have about 40 tasks left and almost no deadlines. Yay! To keep it that way, I am experimenting with work in progress limits from Kanban:

- - - - - - - -

I pulled these numbers out of a hat just to have something to work with. I will follow up on how these constraints work and evolve over time.

- - - -

We got married!

- - - -

Anna and I got married on the last day of July! Our string quartet welcomed Anna with the sound of 20th-century fox fanfare instead of the classical Mendelssohn March. It was fantastic!

- - - -
- - - -

I’m surprised by how well it all went considering we’ve only spent about 40 hours on preparations. Instead of shaping a narrowly-defined perfect wedding, we hired trustworthy vendors, set minimal viable expectations, and gave them complete autonomy. It was a bet, and it turned out great.

- - - -

For example, our DJ, photographer, and venue staff coordinated without our involvement. They timed the meals, the music, the wedding cake, and the outdoor photoshoot perfectly. We were impressed! Our venue even added lovely touches, such as kids-friendly champagne made of sparkling water and apple juice.

- - - -

If we tried micromanaging, not only would we be more stressed, but we would also likely get worse results.

- - - -

We also made our own wedding bands using molding wax. It was our first wax project. As we climbed the learning curve for 40 hours filled with trial, error, and frustration, we realized we’ve severely underestimated how long it would take. We could have planned another wedding during that time!

- - - -

Still, it was worth it. We now get to carry a symbol of our love as unique as the two of us.

- - - -
- - - -

After my 30th birthday, I time-traveled an entire decade to reflect

- - - -

As of October, I’m 30 years old. Being the best partner I could have imagined, Anna prepared a day full of friends and surprises for me. At no point did I know what was going to happen next. It was perfect! It rooted me in the moment, giving me no chance to think about how cool the next thing is going to be. We ended with a Halloween-themed party.

- - - -
- - - -

- - - -

Shortly after, I had the perfect opportunity to reflect upon the past decade. A work trip enabled me to visit the same place I contemplated as a 20-year-old young adult: The Montjuic Castle in Barcelona. As I stood in the same spot, faced the same panorama, and felt the same cold breeze on my cheeks as a decade ago, I was flooded by vivid memories from that time. It was illuminating.

- - - -

I remembered how stressed I was back then about dropping out of university, my future career, the unhappy relationship. Then I noticed how all these insurmountable problems are gone. I figured out my career, let go of strategizing the future, and found a fulfilling relationship. Of course, I still have worries and problems, but they’re all different now.

- - - -

I like to come back to that moment whenever I stress about something. Will it matter ten years from now? If not, why worry? It will all work out in the end.

- - - -

Just-in-time education replaced my Master’s

- - - -

I got my Bachelor’s in Computer Science with a 4.0. GPA. It took me 6 months, most of which I spent writing the white paper about the impact of AI on pharmaceutical research.

- - - -

In retrospect, I’m not sure if my Bachelor’s was worth it. I traded $10k and many evenings for a diploma that opened the doors to a Master’s program. I even accepted, but then I dropped out due to my goals bankruptcy.

- - - -

Instead, I signed up for Building A Second Brain, which redefined my relationship with knowledge. I learned how to retain all my learning indefinitely and reap compound interests on it. Next, I took the Write of Passage, which taught me to turn consumption into creation. This is how I created this blog. I also realized I have a severe case of writer’s block, but I overcame it thanks to The Writing Studio

- - - -

It’s crazy how it almost didn’t happen! Had I stuck to my original goals, I would have missed a chance to improve how I work, spend my time, and even talk to people. Serendipity is a powerful force. I will try to leverage it even more through a learning strategy I called just-in-time education.

- - - -

As a side note, I am grateful to Automattic for paying the tuition. These courses were expensive to me, and I don’t think I would have paid out of pocket.

- - - -

The other courses I took weren’t as good, so I’ll spare you the details. Other than that, I spent quite a bit of time learning about ADHD, finances, Web3, data science, turn-based gaming AI, and a few programming languages: Scala and F#. I intend to write articles on some of these topics, so stay tuned! 

- - - -

I let go of a data science career and started compounding my productivity over time

- - - -

I started the year as a data scientist in Tumblr. I thought I’d pivot my career in that direction, but in the end, I quit.

- - - -

It was six months filled with fun roleplay. I became Sherlock Holmes in rainy London to interrogate the data, Plato in sunny Greece to ponder questions like Oh you want to find similar content? But what does similar even mean?, and McGyver in trouble to prototype statistical models. I enjoyed that! But I also realized it wasn’t the right fit for me.

- - - -

The time in the data science world flows slower. Processing big data takes time, so my feedback loop was no longer measured in minutes but hours. My ADHD struggled. There was also something else: I missed working with the WordPress community. Data science was fascinating, but it just didn’t fire me up as much the same way. It all coincided with my goals bankruptcy, so I gave myself permission to return to WordPress.

- - - -

Shortly after, I stumbled upon How To Get Rich by Naval. It's been one of the best things I've ever read. I realized I can trade my work for not just money, but also for published articles, retained knowledge, built reputation, better relationships, and more opportunities. It’s like building a modern capital.

- - - -

As a first step, I brought writing to my day-to-day work. For example, I've been learning about a particularly tricky part of WordPress for months, drafted a technical tutorial about it, and now you can learn it in a day. Everyone wins. I’ve also researched the impact of Web3 on the future of online publishing, which matters greatly for WordPress. I’ve recently published my thoughts so far.

- - - -

In 2022, I would like to double down on writing. Ideally, I won’t move on to the next book, course, and online research before writing an article about the last one. Let’s see how it will go!

- - - -

I wrote a short novel worth of thoughts

- - - -

I am proud to say that I wrote 20,000+ words in 2021. Here’s some of them:

- - - - - - - -

To me, it’s more than just writing – it is a personal breakthrough.

- - - -

In January, I was convinced I could never write consistently. Every time I tried to write something longer, I would second-guess, self-edit, and rewrite every sentence a gazillion times. The result? I was lucky if a two-hour writing session yielded a single paragraph.

- - - -

Then I enrolled in the Write of Passage and started this blog. The goal seemed simple: to publish five short articles. How hard could that be? I thought. I sat down, cracked my knuckles, opened my laptop, and two frustrating hours later, I read my answer off the empty screen. It was very hard.

- - - -

Writing a few short posts took me more than a hundred hours. It wasn’t working, but I was too stubborn to quit. At one point, I got burned out, threw the papers, and went to Greece to recuperate. I couldn’t figure out what was wrong.

- - - -

Call it insanity, but once I returned and regained some motivation, I enrolled in yet another course called The Writing Studio. I hoped to figure out my writer's block. Although TWS was excellent, I still spent way too much time writing, missed all the deadlines, and began to give up. And then, as I was recapping one of the exercises, it all clicked.

- - - -

I approached writing all wrong. My default mode was to sit down and power through tasks. Even when I was tired, I often said I want this off my to-do list already and kept going. It worked well for many things, but I realized I just can’t write this way.

- - - -

Writing is more like falling asleep. It only works when I show up, relax, and don’t overthink it. But when I feel pressed, impatient, and tense, I keep going in circles. In bed, I keep tossing and turning, and in writing, I keep rewriting the same sentence fifty times and second-guessing all my ideas.

- - - -

I adjusted my writing strategy to fit my style. I don’t block multi-hour writing sessions in my calendar anymore. Instead, I only show up for 5 minutes of writing every day. Sometimes I’m into it, keep going beyond these 5 minutes, and end up writing a few dozens or hundred words. Other times I struggle, call it a day, and go for a walk instead. I don’t judge the outcome. I only aim to show up consistently.

- - - -

I may leverage deadlines to publish regularly one day, but I'm not there yet. For now, I just write.

- - - -

I self-educated on investing and built an effective portfolio

- - - -

In 2021, I got a few months ahead of my optimistic projections from 2020. Three things made that possible.

- - - -

First, I saved more than I expected. My goals bankruptcy erased all the projected spendings for my Master’s degree and other projects. In addition, my Bachelor’s degree and Stanford’s AI program ended up being less expensive than I initially expected.

- - - -

Second, my financial self-education paid off. I was afraid of keeping my savings in cash but didn't know enough about finances to manage my own money. The local financial advisors only seemed to talk about costly mutual funds, so I sighed and did my own research. It was hard work, but it has paid off.

- - - -

I built an investment portfolio that grew more than 20% last year which is less than SP500, but I am still thrilled. In broad strokes, my asset allocation is as follows:

- - - - - - - -

If that sounds interesting, shoot me an email. I could dive into more details in my new post series about personal finance. I just need a little push.

- - - -

Finally, I changed my outlook on investing. I used to think that living my best life required reaching early retirement. Last year, I realized it’s a mirage that distracts me from enjoying today.

- - - -

Crossing the gap between savings and early retirement is like swimming through the Atlantic ocean on a kayak. Some people get there, but not everyone will. Even if I ever do, I want to be honest: Laying on the beach all day sounds just dull. I'd much rather express myself creatively during the day, spend evenings with my close ones, and travel from time to time to change scenery.

- - - -

Except this is what I already do! It took me years to realize that. Reaching financial freedom wouldn't change anything fundamental about spending my days. That's great news! It means I can treat my savings as a peace-of-mind vehicle, not a top-of-mind strategic asset to monitor each day. It is a different, more relaxed game.

- - - -

I crashed with a car and started biking indoors

- - - -

Once my Apple Watch told me that my aerobic capacity (VO2max) was below average, I started exercising more.

- - - -

I made a lot of attempts: Tango lessons, bouldering, rucking, squash, go-karting, laser tag, short HIIT training, calisthenics, running, and biking. Running stuck with me. Perhaps for the first time in my life, I have been consistently jogging on most days for three months, 

- - - -

I surprised myself here. I used to dread running – it keeps my body busy but leaves my mind bored. Still, I knew I had to do something, and running was the most convenient option. It worked on my schedule, and I could start and be done in the same 30 minutes window I would have otherwise spent commuting to an organized class or a gym.

- - - -

I overcame the boredom issue by giving my brain something to do. Sometimes I practiced mindfulness; other times, I listened to Huberman lab's podcast, and I even called someone a few times. It worked, and I learned to enjoy jogging. Yay! It showed on my apple watch, too: After about 30 days, my VO2max hit the above-average slot, and it has stayed there ever since. 

- - - -

Unfortunately, I injured my foot during a laser tag game on my 30th birthday and couldn't run anymore. I needed a different sport.

- - - -

I turned to bike. It was joyful, but I underestimated the dangers of cycling on a slippery road in winter. One day, a car drove out of a garage and stopped right in front of me. We were both going just a bit too fast, and this specific place made it hard to see that coming for either of us. I started breaking, but it was too late. I hit that car from a side, flew over the hood head-first, and hit the concrete.

- - - -

How am I still here? Maybe that's luck, or perhaps that's some reflexes back from my martial arts/parkour years, but I turned in mid-air, then guided the impact with my arms, and hit the ground mainly with the side of my butt. It hurt like hell! As I was laying on the ground in pain, I was scared I got seriously injured, but after a few minutes the worst pain has passed and I was able to get up. I got away with a big bruise and a lesson about safety.

- - - -

And that's how I ended up getting a bicycle trainer. It's a simple device where I mount my regular bike and drive in the comfort of my apartment while reading some low-focus articles or watching Locke&Key on Netflix. I liked it enough to turn it into a habit, which I hope to retain for the entire 2022.

- - - -

Project Kangaroo

- - - -

Anna and I applied for Australian visas in the first half of 2021. Initially, we want to go there for six months and see how we like it. It’s like a test drive. We may miss our home and return, or we may find it fantastic and apply for a proper immigration visa. 

- - - -

When will we go? I have no idea! There is too much uncertainty to tell. Covid derailed all the visa procedures, and we’re still waiting for our approvals. It may happen tomorrow, next year, or never if we get rejected. For now, I don’t think about it too much and just wait.

- - - -

What’s next?

- - - -

I made 2021 about doing more. Instead of shaping the bright future I envisioned, I ended up chasing goals, grandiose plans and getting burned out. It wasn't bad. It was just the cost of getting to know myself better.

- - - -

I will make 2022 about doing less. My only map is my intuition. Amor fati, as the Stoics would say. I am open to whatever life will bring. Where is it going to take me? Who knows? We'll see next year!

- diff --git a/transfer-protocol/tricky-markup.html b/transfer-protocol/tricky-markup.html new file mode 100644 index 0000000..1f05bb8 --- /dev/null +++ b/transfer-protocol/tricky-markup.html @@ -0,0 +1,26 @@ + +

+ + 🚀-science.com/science has the best scientific articles on the internet! We're also + available via the punycode URL: + + + https://xn---science-7f85g.com/%73%63ience/. + + + This isn't migrated: https://🚀-science.comcast/science
+ Or this: super-🚀-science.com/science +

+ + + + + + + + + + + + +