Jason Leow

Indie hacker, solopreneur | Creating a diverse portfolio of products + services.

Day 18 - Off-grid life https://golifelog.com/posts/off-grid-life-1610956257315

Sent payment link to Sweet Life Asia for S$30 Boosted ad on

Using new payment provider Superpay https://superpayit.com/ because Wirize got acquired by it. 1% txn fee, not too bad at all

Day 17 - Rest is a mindset https://golifelog.com/posts/rest-is-a-mindset-1610874338860

Rest is a form of productivity too...

🀞 Installed patch-package module so that changes to node_modules will persist! Hope this is the last time I'm trying this!

Install patch-package
Edit package.json
Make changes to node_modules/module, added the correct offset function `new Date().setUTCMinutes(-180)` in `date-streaks` helper.js
Run npx patch-package package-name
Git commit and push

[UPDATE:] And it worked!!! πŸŽ‰

Day 16 - 1% compounding improvements https://golifelog.com/posts/1percent-compounding-improvements-1610788199026

On the surface, 1% improvement don’t seem like much. But 1% compounded daily over a year means you’ll be 37.8 times better than when you started. The power of compounding is the reason why consistency matters as much asβ€”or even arguably, more thanβ€”intensity....

🀞 Deployed new profile page with personal posts feed

While I work on the weird streak bugs (streaks going to zero then restored when you post) and the @mentions/notifications features which take more time on the backend, I didn't want to lose momentum by holding back all the other lower-hanging frontend features. So will be taking a concurrent approach, releasing smaller features while I work on the big ones!

πŸ’΅ Received another $120 onetime deal payment for Lifelog. Thank you @therealbrandonwilson!

πŸ“ˆ Total one-off revenue: $600
πŸ“Š MRR: $20

Made a prettier profile page with user's posts

While working on features that take longer, I felt I needed to also concurrently work on the lower-hanging fruits so that there's a sense of momentum.

Social impact volunteering: Reinstated landing page to non-festive mode (removed Xmas campaign)

Day 15 - 4000 weeks to love https://golifelog.com/posts/4000-weeks-to-live-1610699672952

🀞 Added the correct offset function in `date-streaks` helper.js

❌ new Date().toLocaleString('en-US', { timeZone: 'America/Sao_Paulo' })
βœ… new Date().setUTCMinutes(-180)

πŸ•πŸ•œπŸ•¦Created a multi-timezone panel of all my current users to debug this timezone issue

Savvy Time had been super useful so far!

https://savvytime.com/converter/ca-los-angeles-to-az-phoenix-ny-new-york-city-trinidad-and-tobago-port-of-spain-brazil-sao-paulo-utc-switzerland-zurich-finland-helsinki-kuwait-al-ahmadi-india-kolkata-sgt-australia-melbourne

⏳ Added a super-lame, temporary hack as a stop gap measure to (try to) reduce chances of broken streaks, to buy more time to roll my own streak.js plugin

Streaks were 'breaking' and then restored due to the current day being hard-coded in UTC time by the `date-streaks` module. So I found that by shifting the timezone by a few hours (to UTC-3:00), it gives some of my US-based writers time to post for the day so that their streak didn't 'break' before they posted.

new Date().toLocaleString('en-US', { timeZone: 'America/Sao_Paulo' })

Day 14 - What is a rare combination of two skills that when combined make someone unstoppable? https://golifelog.com/posts/what-is-a-rare-combination-of-two-skills-that-when-combined-make-someone-unstoppable-1610599782019

For indie hackers/makers, namely, developing, designing and marketing.

Researched and consulted widely on approach to solve the remaining streak bug

Taking a step back, to solve this new Date() doesn't apply offset issue, there seems to be 3 approaches I can take.

1. Patch date-streaks module directly by adding offset to new Date(), seems least effort, but hard to understand their code
2. Make my own streak.js plugin - making from scratch feels time-consuming but more control and less downstream gotchas
3. Use afterCreate lifecycle hooks within Strapi to save a new content-type streaks, so it's not calculated on the fly every time but saved as an integer as each post is created.

Day 13 - Rest != Sleep https://golifelog.com/posts/rest-sleep-1610543910415

Day 12 - Micro steps https://golifelog.com/posts/micro-steps-1610446250918

πŸ”₯ Activated 9 transfer requests for the Carrd accordion dropdown FAQs menu template

People are really liking it! https://animatedaccordionfaqs.carrd.co/

🐞 Identified minor bug within streaks algorithm

OK...... looks like the streak bug is still not completely dead, just like how cockroaches die hard. At least I identified the problem within a day, which is something to celebrate over. The first step to solving any bug is to isolate and identify, so that's a pat on my own back at least. My date streaks module uses `new Date()` in UTC to set the current day/date, and it doesn't apply user's timezone offset. So the array of published dates are offset to user's tz but it's always referenced to the the current date in UTC, which is why sometimes the streak breaks but restores when the user posts (e.g. if the user happen to write past the UTC midnight but still within his tz's midnight).

πŸ’΅ Yet another lifetime deal (US$120) customer for Lifelog! Thank you so much @brianball for your support!

πŸ“ˆ Total one-off revenue: $480
πŸ“Š MRR: $20

Got hot reloading working for comment threads

Used `this.$nuxt.refresh()` to refresh just the page data for the comments (when user submits a comment), instead of an in-elegant entire page reload using `this.$router.go(0)`

Faced slight problem of input fields persisting even after submitting, so had to add `this.content = ' '`

await this.$axios.post('/comments', {
...
})
this.content = ' '
this.$nuxt.refresh()

Ref:
https://stackoverflow.com/questions/41518609/clearing-input-in-vuejs-form
https://nuxtjs.org/docs/2.x/concepts/context-helpers#refreshing-page-data

🀜πŸ’₯🐞πŸ’₯πŸ€›FIXED the timezone aspect of the streak algorithm! FINAAALLLYYY after 2 days of research and trial & error

Tried using `${Intl.DateTimeFormat().resolvedOptions().timeZone}` in my SQL query but it didn't work. Didn't know how else to integrate that into my controller either. Discovered later I could try `date.getTimezoneOffset()` too, but had already went with using a combination of SQL function AT TIME ZONE, and getting users to set their timezone (I created a new table in the db to manually add their timezones first. If all works, will refactor to add a new column in the existing user's table).

Day 11 - Everyone can be a Gumroad entrepreneur now https://golifelog.com/posts/everyone-can-be-a-gumroad-entrepreneur-now-1610347236235

πŸ€‘ Just received another lifetime deal payment $120! Thank you @peterdannock!