David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
David Kimura PRO said almost 2 years ago on Cloudflare Turnstile :
That's really strange. I've implemented this a few times, referring back to this episode, and didn't have any issues with it's implementation. I did use the Cloudflare Proxy on those apps, so I wonder if that sets something in the header that could make a difference. It's pretty annoying to test those kinds of things out since the browser does some level of caching. It's usually a dance of having to clear my local DNS settings and the browser's.

David Kimura PRO said almost 2 years ago on Stripe Billing Portal :
  marvinick You should be able to create the plan via the code which is what I normally do. See if this helps.

plans = [
  {
    product: {
      name: 'Annual',
      id: 'annual'
    },
    id: 'annual',
    interval: 'year',
    currency: 'usd',
    amount: 1900
  },
].freeze

plans.each do |plan|
  Stripe::Plan.create(plan)
rescue Stripe::InvalidRequestError => e
  puts e.inspect
  next
end

David Kimura PRO said almost 2 years ago on Using LLMs to Generate Tags :
I forgot to mention this, but I've used this methodology with a few different custom models for an expense tracker app that I use for personal finances. I use it to upload receipts which go through an OCR process and then feeds the receipt text to the LLM. It makes a few calls to determine the date, vendor, category and total price. So, it cuts down the amount of data entry that I have to do and all newly uploaded receipts to into a "pending" state until they can be reviewed and "processed". 

David Kimura PRO said almost 2 years ago :
I've been meaning to cover something like this where when using importmaps and libraries that provide CSS. I think there are a few different approaches you could take. 

  • You could still rely on yarn and "double install" (via importmaps and yarn) the library. In your CSS, you can import the css libraries, but then use the importmaps as you normally would.
  • You can manually download the CSS file from the version that you're using. This should work if the library provides a minified CSS file. In your app/assets/stylesheets, I would create a vendor folder and place them in there.

I haven't done much research on either of these to determine the best route, but could be something worth exploring.

David Kimura PRO said almost 2 years ago on Tracking Writebook Changes :
Yes, you could. You would basically need to have a proxy where any requests to /writebook would be forwarded to a different ip/port/site/etc. You could probably do this at a CloudFlare level with a page rule that matches /writebook/* to forward to a different address. Typically with Apache or Nginx, you would use a proxy pass through to another location.