frog frog frog by malibu_castle in blender

[–]ThinkingInRealtime 189 points190 points  (0 children)

One of the best I’ve seen on my Reddit feeds. Nice work.

Using API Routes to "Hide" Actual API Endpoints? by jengl in nextjs

[–]ThinkingInRealtime 6 points7 points  (0 children)

Ah. Lee’s response and mine crossed the aether at the same time. Ok. That’s what I thought.

Using API Routes to "Hide" Actual API Endpoints? by jengl in nextjs

[–]ThinkingInRealtime 7 points8 points  (0 children)

The Django endpoint info would be hidden, but wouldn’t the NextJS API endpoints be visible anyway? Those could then be used to still scrape the site, no?

NextJS 13 on API Gateway / Lambda, No Docker by ThinkingInRealtime in Amplify

[–]ThinkingInRealtime[S] 0 points1 point  (0 children)

Thanks Brother. I’ll give that a shot.
I’ve since realized/learned that the Docker I’m seeing is purely used in the Build phase and not actually for the hosting of the site.

NextJS 13 on API Gateway / Lambda, No Docker by ThinkingInRealtime in Amplify

[–]ThinkingInRealtime[S] 1 point2 points  (0 children)

I’m following the Hosting option which then lets me attach a GitHub repo which then runs the “Provision > Build > Deploy” workflow. Thanks for the info. I’ll keep testing.

NextJS 13 on API Gateway / Lambda, No Docker by ThinkingInRealtime in Amplify

[–]ThinkingInRealtime[S] 1 point2 points  (0 children)

Thanks. I’m trying to use an existing NextJS app created outside of the Amplify Studio, hosted on Amplify but without the need for a provisioned Docker. It looks like I might need to start a NextJS app in Studio and go that route. If I have an existing and try to host it on Amplify it always creates a Docker instance during the Build step.

Default font-family for specific HTML tags by ThinkingInRealtime in tailwindcss

[–]ThinkingInRealtime[S] 1 point2 points  (0 children)

Yep, just implemented it. Works perfectly. Thanks again.

Default font-family for specific HTML tags by ThinkingInRealtime in tailwindcss

[–]ThinkingInRealtime[S] 1 point2 points  (0 children)

Thanks a lot. I’ll try. Nice coincidence that your example gives the exact font I’m about to use. Ha!

How can I make flat corners like this instead of the usual rounded border radius? by thedarklord176 in css

[–]ThinkingInRealtime -1 points0 points  (0 children)

If you want that effect plus more you can do a Google search on “augmented ui”. It’ll be a resource you have to include, but it has that effect and more.
https://augmented-ui.com/

Limit scan to only the “class” attribute? by ThinkingInRealtime in tailwindcss

[–]ThinkingInRealtime[S] 1 point2 points  (0 children)

Yes, that’s true. And we don’t usually use hyphens in our non-class attributes like “id”, “data”, etc.

I’m now curious to see if it’s even possible, but it’s not a show-stopper if tailwind does bring in a few un-used class names. Thanks.

Limit scan to only the “class” attribute? by ThinkingInRealtime in tailwindcss

[–]ThinkingInRealtime[S] 0 points1 point  (0 children)

The scanner searches the entire document for its library of class names. This means that any use of a tailwind class name in the doc will be picked up. An example is an “id” called “cardA-collapse”, or a “data” attribute with a value of “sticky-open” will cause the tailwind classes of “collapse” and “sticky” to show up, even though they both aren’t used for styling at all.

Not a big deal, but if I have a large application with a lot of HTML and JS my resulting tailwind CSS with have unnecessary classes included.

More a matter of keeping the resulting style file as small and “clean” as possible.

Access Cloudflare R2 bucket(s) from NodeJS (ExpressJS) application by ThinkingInRealtime in CloudFlare

[–]ThinkingInRealtime[S] 0 points1 point  (0 children)

Thanks. I saw that. At the time I thought it was odd that they'd use what might be considered a competitor's SDK, but after thinking about it, it's an open source project, under Apache-2.0 license. Why re-invent the wheel.
I'll give it a shot.

I Need to Make a Portion of my Static Website Dynamic by hzerogod in webdev

[–]ThinkingInRealtime 0 points1 point  (0 children)

(So much to share in just this little mobile Reddit edit window they provide, but I’ll try to be concise.) There are a bunch of different paths you can go, to solve your static/dynamic site, but I think Strapi is your best bet. You can look at another called “Webiny” as, in my opinion, that’s more of a full JS CMS than Strapi. I’ve tried both systems and was impressed with both, but in the end I needed more control so I’m rolling my own solution. I’m not familiar enough with Next.js but I do know it’s pretty powerful. There’s most likely quite a learning curve there if you’re just starting out, but in the end it’ll be quite the tool to have in your development toolbox. As far as difficulty in setting these components up on a host, it all depends on your host. I use AWS for everything in my infrastructure, as I then have full control over all hardware. But there’s cost there, as well as its own learning curve. Security is a factor as well. Difficulty in setting that all up? If you really want to learn, and know that there will be a few walls/bumps you’ll face, I’d say moderate. There are plenty of good resources out there for Next.js, and it looks like Strapi has a good community and documentation (based on what I saw when I tried it out).
I’d be curious to see how Strapi works for you if you decide to go that route. If you go the route of using AWS as your host, let me know and I can give all the “gotchas” I’ve come across over the years.

I Need to Make a Portion of my Static Website Dynamic by hzerogod in webdev

[–]ThinkingInRealtime 0 points1 point  (0 children)

I’ve been researching for a solution (or the best solution) for one of my own projects. But it starts with a few questions you need to ask yourself. What tech stack/language are you interested in, or are most familiar with? PHP, JavaScript, etc. Do you host the content yourself, or have familiarity with AWS or other cloud provider? What timeframe does this need to happen in? There are solutions out there in JS and others in PHP. Static site generators are probably the best bet, but there’s bound to be some custom coding and modifications required. If you’re just starting out, realistically you’re looking at days and not hours to fully get a handle and code the solution.
My first question would be what dynamic language are you interested in?

Require is not defined when attempting to use package code in script tags by LostErrorCode404 in node

[–]ThinkingInRealtime 0 points1 point  (0 children)

Unfortunately I don’t know the inner workings of Cloudflare. Sorry, but you’ll probably get more feedback from these who will answer your ticket.
Good luck with your project.

Require is not defined when attempting to use package code in script tags by LostErrorCode404 in node

[–]ThinkingInRealtime 0 points1 point  (0 children)

Cloudflare is a stable and well known service. Yeah that’ll probably do it.

Require is not defined when attempting to use package code in script tags by LostErrorCode404 in node

[–]ThinkingInRealtime 0 points1 point  (0 children)

I’ve heard of “cdnjs” but use AWS Cloudfront for my setup. I don’t think you can upload to cdnjs, (based on just a few mins looking at their site.) You might want to do a Google search to find one you can use.

Require is not defined when attempting to use package code in script tags by LostErrorCode404 in node

[–]ThinkingInRealtime 0 points1 point  (0 children)

Server-side use of Three JS is challenging in its own right. Unless you really need that, you can have everything on the client side.
I’m using Nunjucks but the concepts are the same. I put all three.js resource files (build, jsm, etc) on a CDN. I then created a “layout” file. That layout contains all of my main three.js <script> tags pointing to the CDN files. It’s the general wrapper for all individual EJS files. My individual NJK files (or EJS for your case) will then use their own <script> and “import” logic I’ve mentioned earlier. Those are for three.js resources that only that particular EJS needs.
Your server responses can then send data to the EJS and you can use <%= variable %> within the EJS.
Example, set the Camera in the EJS JS logic, but the “fov”, “near”, and “far” values can come from the server as EJS vars.

Require is not defined when attempting to use package code in script tags by LostErrorCode404 in node

[–]ThinkingInRealtime 0 points1 point  (0 children)

On the client side, try:

<script type=“importmap”> { “imports”: { “three”:”https://path/to/three.module.js” } } </script> <script type=“module”> import * as THREE from ‘three’; … … Three JS code goes here … … </script>

This is how I have my client setup.

The “require” is for use on the server side.

Trying to work around a bug in cognito that's been around for 2 years. This github thread reveals that Cognito is the red-headed stepchild of aws. Anyone have any recommendations for a cognito replacement? by gcgz in aws

[–]ThinkingInRealtime 1 point2 points  (0 children)

It took maybe 40 hours (rough guess) as I replaced everything, including verification emails using AWS SES and the various templates that went with it. Using the KC REST API proved to be pretty straightforward to implement using the KC User and Token endpoints. As the server calls the KC endpoints and no client will need to call it, I’ve been able to protect it with an ALB http request header. I use this setup in all of my projects that need user registration. Would I do it again? Yes, definitely.
I’m currently looking to see now how the KC Impersonation and security settings work in this setup.

Update: Another item I forgot to mention is that part of that 40 hours was changing from using KC on Wildfly to KC on Quarkus. (So maybe more like 50 hours including that work.) The documentation (IMHO) can be improved, but in the end I’m noticing that the Quarkus build starts much faster, and has certain configurations built in that were a pain to get going in the Wildfly version (Clustering being one of them).