Avatar
mozharov
69dc22976fdbe427d4a666466ca0d4acca477c0b2a444adcafc84cf8cd3c53fa
Developer, writer, healthy man. Building t.me/zap_gram_bot — Lightning Wallet in Telegram.

Generate LN invoices on static sites without revealing your NWC secret.

Problem:

There are excellent JS libraries for working with #NWC, like nostr:npub1getal6ykt05fsz5nqu4uld09nfj3y3qxmv8crys4aeut53unfvlqr80nfm 's js-sdk. The problem is that they're only suitable for working with the site user's wallet. But what if I want to generate #Lightning invoices on my site, for example, to collect donations? This requires a service layer on the backend, because if you simply generate invoices via NWC on the frontend, you'd have to expose your NWC secret.

Solution:

Therefore, I created a simple microservice where you can insert your NWC secret and get a unique endpoint for generating invoices on demand! To generate invoices, you just need to add a simple JS script to your static site that will call the received API method.

Instructions:

1. Visit the website: https://ln-invoice-generator.mozharov.me

2. Insert your NWC secret (you can limit NWC to only invoice creation rights or set a minimum budget for security)

3. Get example code and a URL that when called generates a Lightning invoice for the specified amount

4. Insert the script into your site

5. Enjoy

The integration example provided is very simple, so you may need to enhance it slightly to achieve the necessary functionality. Any AI can easily handle this, but feel free to contact me if you need help with installation!

The service doesn't charge any fees — all invoices are generated directly by your Lightning wallet.

By the way, you can even deploy this service on your own server — it only requires Node.js.

Here's the GitHub repo: https://github.com/mozharov/ln-invoice-generator

You can see an example of the script working on nostr:npub1tcalvjvswjh5rwhr3gywmfjzghthexjpddzvlxre9wxfqz4euqys0309hn's website. Just click on the “zap” button.

#grownostr #dev

I found that I enjoy studying philosophy, especially the works of ancient philosophers. I feel not only interest, but also significant benefits. The knowledge gained influences both my business and lifestyle, and generally changes my thinking patterns. For example, I've been studying Marcus Aurelius, and now finishing reading the basics on logic from Aristotle - "Categories. On Interpretation."

Downloaded more of Aristotle's major works. Really want to study each one: Physics, Politics, Rhetoric, Poetics, Ethics, Analytics, Metaphysics.

Aristotle is a universal thinker with a wide range of interests, who made significant contributions in various fields. His works remain relevant and widely used to this day.

I can't wait to study each work in more detail. 🤓

Thank you!

Here's my current routine:

- interval fasting: 6/18

- Meal window: 9 AM to 3 PM

- honoring my sleep schedule. I go to bed around 9 PM, get up around 5-6 AM. Don't use an alarm clock.

- My diet is close to the green Mediterranean diet, but I also eat eggs, seafood, chicken (rarely), dairy like yogurts

- 30-70 minutes of daily workouts in the morning on an empty stomach.

- workouts include: running, calisthenics, HIIT, Pilates, power yoga for balance and stretching, relaxation yoga. 3-5 days a week for cardio, functional and strength training, the rest less intense and more relaxing activities.

- Sometimes in the morning I meditate and do Wim Hof breathing practices

- an hour before bedtime I do yoga stretching. Stretching for the lower back is especially useful for me, so that at night I don't have to fidget in different positions.

- as little fried, highly processed, sweet and junk food as possible.

- as much activity as possible during the day

Whoop says I'm 3 years younger than my chronological age and the pace of aging has slowed to -0.9x 😎

Thanks! It's very tasty indeed. Love it

Vibe-coded for myself a web app for tracking food inventory and meal planning with nutrient calculation: https://mozharov.github.io/nutrition-tracker/

It's become much more convenient to keep track, and now I don't need any trackers or other apps. I eat at home. So I just enter all the products from my diet once and specify their nutrients, and then when planning meals I simply select the quantity of products from the list. All nutrients are calculated automatically and saved to history + the product quantities are immediately subtracted from inventory.

Overall, this has really optimized my time 😃

Development took 10 minutes.

I'm adding features for convenience bit by bit each day.

All information is stored locally in the browser. Feel free to use it. The code is open source ( https://github.com/mozharov/nutrition-tracker).

First week with FUTO Keyboard. Decided to try it out after reading this article.

Damn it's so good! Especially Voice Input. Now I can take notes with my voice. Detects words very well. Couldn't get away from google keyboard for a long time, but now the moment has come.

The only thing is that swipe input doesn't work perfectly yet, especially in Russian. nostr:note1sr56uct34axz4kqncxn2rtmn606qsukff648wd7dprzfufxnxc2sgmufde

Now about my #achievements and more:

₿ First, I've arranged a partnership with https://21ideas.org/en/. We discussed a Bitcoin payment service. I'm creating a service for them that they can easily integrate via API into their projects. This service handles all the work with receiving and processing Bitcoin payments, as well as monthly subscription-based payments. Think of it as "Stripe on Bitcoin standard." I get a percentage from each transaction, and they get rid of the headache with payments, subscriber database, and running their own node. They'll launch their first project with the payment system in the next couple of weeks.

My goal of generating income in #Bitcoin is getting closer. 🫡

I plan to continue developing this service as a separate project.

By the way, the basic version is already ready. So if you have questions about accepting Bitcoin #payments, you know who to contact 😎

Creating the service wasn't difficult since I already have a Lightning Network #wallet bot on Telegram — https://t.me/zap_gram_bot. Which, by the way, is used daily in https://t.me/bitcoin21ideas chat for sending satoshis between participants and for paid chat access. So if you need paid entry control for Bitcoin or just the ability to donate Bitcoin in #Telegram chats/channels, I'm here to help 🫡

😬 Second, turns out I've been brushing my teeth wrong my whole life.

I bought myself good toothpaste and a soft brush. Found out that you shouldn't rinse your mouth with water after brushing, but instead leave the toothpaste foam on your teeth... Especially effective to leave it overnight. But first you must buy toothpaste with good ingredients! Otherwise there's a risk of burning your mouth.

I've been brushing like this for 2 weeks now, carefully going over each tooth. There are results! At minimum, I feel more freshness. At maximum, I see "dissolution" of cavities on my teeth. And overall my teeth have become whiter 🦷

💈Third, I've been washing my hair wrong my whole life with the wrong products!

Before, if I skipped washing with shampoo for one day, my hair would become greasy the next day. Often my hair would become greasy by evening if I didn't wash it in the morning. Now I wash my hair with shampoo only once every 3 days, and my hair stays clean! On other days I just thoroughly clean with my hands under water. I think nutrition played a role here too. I bought shampoo with good ingredients.

Now I realize I could write an article about oral and hair care. I discovered a lot of new things for myself while studying this topic.

🏘 Fourth, I moved to a bigger apartment. In the previous one I really lacked space for workouts and cooking. And there was a terrible and small refrigerator, which wasn't really a refrigerator but some kind of melting box. Especially the freezer was extremely bad - it didn't freeze at all and only spoiled my products. Now I have a normal refrigerator with large size! Now I have a two-room apartment, and there's plenty of space for yoga and other workouts. And the kitchen is bigger! I love it!

Fifth, my flexibility has significantly improved!

My legs, pelvis and shoulders sometimes stretch so well that I feel what seems like mild pain, but at the same time it's very pleasant due to new ranges of motion and sensations. And I can cross my arms behind my back from both sides even deeper!

However, I have problems with my neck. In a relaxed state, my head "goes" forward and down. All because of the phone and sedentary lifestyle with head down!

I'm working on correcting and "stretching" my spine. Progress is happening, and I can feel it. But very slowly. I'm looking for the most effective #exercises specifically for my case. nostr:note1g0u6gv0mx4pgrrdu8chtchq6x6yjpmthwz0099lnw2exdu6ce7asw9knhm

Here's what I've been doing the past couple of weeks. About my #routine :

😴 #Sleep :

Since I finally got my #Whoop, I can now track my changes. And the changes are significant! Sleep has improved dramatically.

Even yesterday, considering I woke up around 1 AM and couldn't fall back asleep for a long time, my sleep metrics are still excellent. Moreover, last night I set a record RHR value — 44 bpm! I slept well.

All these days I've had a stable sleep schedule. I fell asleep in less than 5 minutes every day between 8:30-9:30 PM. Woke up consistently between 5:30-6:45 AM. Average sleep duration: 7.5 hours.

Problem: I consistently wake up once during the night to use the bathroom. I've even stopped drinking water 3 hours before bed, but I still wake up. I don't understand what the problem is yet or how to adjust my routine to avoid waking up at night at all.

❤️‍🔥 #Workouts :

I continue daily workouts, but now I'm leaning more toward flexibility and #mobility. I do more #stretching, #yoga, balance and #posture exercises. I notice how my well-being improves more with greater #flexibility than with greater strength. But I'm not abandoning strength training! I consistently do functional #calisthenics training 2-4 times a week for all muscle groups. I continue doing #pilates, #meditation, breathing practices, and #HIIT.

I take walks daily in the evening. Sometimes I run in the morning. Average daily steps: 11,200.

I burn an average of 2,000 calories per day.

😋 #Nutrition:

I decided to expand my eating window and returned to a 6/18 schedule: 6 hours of eating and 18 hours of fasting. Before that, I ate on a 4/20 schedule. Without strict control, I allow myself to eat in an 8/16 mode if I want to, but that has never happened before. On average, I now eat within a 5-6 hour range per day.

Why? 4 hours of eating was still putting too much pressure on me, along with the desire to rush due to strict time constraints. That doesn't suit me - I want to be more flexible and not think about time every minute.

Moreover, my diet is quite nutritious, and I felt too much stress on my GI tract, which shows up as skin rashes. This rash has accompanied me my whole life, and I've long discovered the connection between its appearance and consumed foods/stomach issues, and sometimes stress. The rash started to subside as soon as I returned to the 6-hour eating range. Physically, my stomach feels better too.

I eat an average of 2,000-2,400 calories per day. I decided to stop controlling daily caloric deficit, leaving it to chance. #Intermittent #fasting compensates well for a slight deficit, providing similar effects to #autophagy.

I really enjoy all my #food! Especially oatmeal soaked in nut milk with berries... That's my favorite dish now 😋

🍄 Started taking #supplements:

NMN 300mg in the morning on an empty stomach, 30-60 minutes before eating.

Creatine Monohydrate with breakfast 5-6g.

Vitamin D3 (2000 IU) + K2 MK-7 (100mcg) at lunch with fats and protein.

Magnesium bisglycinate 200 mcg 3 hours before bed.

Effects? Hard to say yet, but the effect should be cumulative. But overall I feel even more energy, sleep depth has improved. It seems like dark circles under my eyes are starting to actively fade. I'm planning to get blood work done.

I attached screenshots of statistics from Whoop. And a photo of me, of course. 😎

#recovery #health #detox

Idk, but now I use nostr:npub1yzvxlwp7wawed5vgefwfmugvumtp8c8t0etk3g8sky4n0ndvyxesnxrf8q and I'm very happy with it

Btw, can you recommend some community apps? (This is the first I've heard of them)

Publishing to different relays seems reasonable, but it would still look bad on my nostr page, where all the publications would just show up in a row, repeating the gist in different languages.

Are there any best practices for publishing content to Nostr in different languages?

I understand you can split npub, but what if I don't want to create different npubs for it? What if I want to publish the same material in different languages?

Give me some advice, it would be very much appreciated ♥️

#asknostr #help #blogging #nostr #publishing #languages

nostr:npub1yzvxlwp7wawed5vgefwfmugvumtp8c8t0etk3g8sky4n0ndvyxesnxrf8q looks like the best Nostr client on Android for me. Convenient, beautiful, fast, functional.

I've been looking for a client that covers all my needs for a long time, and this client looks like what I need.

My #meals for today (love it)

#food #nutrition #health

Why nostr:nprofile1qqs9xtvrphl7p8qnua0gk9zusft33lqjkqqr7cwkr6g8wusu0lle8jcpp3mhxue69uhkyunz9e5k7qg4waehxw309ajkgetw9ehx7um5wghxcctwvsrrnrxl app on android loads any content for a very long time compared to any other client? I have to wait for 1-4 minutes before my feed refreshes or any note\profile information loads. I like Primal, but in other clients everything loads instantly.

Maybe I'm doing something wrong? I use Graphene OS.

#asknostr #primal #nostrclients

My main health metrics (recovery quality) have improved almost 2-fold compared to my metrics from 3 months ago.

My current sleep metrics:

HRV (Heart Rate Variability): 111 ms

RHR (Resting Heart Rate): 47 bpm

Respiratory Rate: 13.4 rpm

HRV and RHR are the two most important indicators for tracking recovery quality. If HRV increases and RHR decreases, it means you're doing everything right.

I'm attaching my average metrics from 6 months ago for comparison. My HRV back then was around 60 ms (terrible), and RHR was 60 bpm. Respiratory rate averaged 15 bpm.

How pleasant it is to track these metric improvements! 😊

I don't use Primal web only because of the lack of authorization through Amber as in the mobile app. I would like to add Amber to the web version as well!