Posts

Showing posts from May, 2024

How to search through files (using VSCode) at a previous commit stage in a local repo

I wanted to change the files to a previous commit in a repo so as to use VSCode search in files feature. Note that searching through a particular file is easy using GitHub or GitHub Desktop or GitGUI. But I could not find a search in all files of project feature in them, which is available in VSCode. I am not confident enough about my git knowledge to go back to a previous commit stage in a live project folder, search through the files and then get back to the latest commit stage in the live project. So, to be on safe side, I made a copy of the project and in the temp copy, I wanted to change the files to the previous commit. But the copy also was linked to the remote repo and so that link had to be snapped to avoid any possible issues. git: how to break link with remote repo I tried to do that using GitHub Desktop and that seemed to do it but there was some confusion. I think Git GUI also may help there using its Remote menu but I am not so sure about it. git command line seems to be

Notes on using Next.js 14 with Pages router to generate static site from data returned by an API

Last updated on 18 May 2024 Static Site Generation (SSG),  https://nextjs.org/docs/pages/building-your-application/rendering/static-site-generation The above page has the key code required to generate a static site from blog posts using fetch to retrieve the blog posts using an API. I used it to write a test app ( its Github repo ) that retrieves latest 5 posts of this blog using Blogger API (v3.0), shows an index page with the post titles which are linked to appropriate pages showing post content. getStaticProps() and getStaticPaths() are used in this test app. I deployed it to Vercel (and later deleted the deployment). The build seems to have generated the 5 static posts as they are listed under "Static Assets" under "Deployment Summary". Hmm. So deploying the static site was very straightforward in Vercel. I had tried deploying it to GitHub Pages without going through any special procedure for next.js apps and that, expectedly, did not work. So the easy Vercel de

Bhagavad Gita and some other Hindu scripture websites/web apps with source code (Next.js, React, React Native, REST API, JSON, AI-ChatGPT)

It has been a pleasant surprise to see quite a few Bhagavad Gita web apps developed using Next.js/React with publicly shared source code, and Bhagavad Gita data being available through REST API as well as raw JSON files. One Github repo focused on sharing Hindu scripture as JSON data goes beyond Bhagavad Gita into Mahabharata, Ramayana and some of the Vedas. Fascinating! I think this should enable easier creation of more web apps. on Hindu scripture using latest web development technologies, satisfying specific needs which are not catered to by the existing free to run web apps. The open-source JSON data is the big enabler, IMHO. Some of the existing web apps' source code may not be reusable as the license (or copyright law in case of no license), may not permit it but one can study the source code and understand the design of the web app. That would make it easier to write a new app without reusing code from that web app. I do not have any exposure, as yet, to writing ChatGPT apps

Notes on: Hand-code simple/medium complexity static websites in HTML, CSS and JavaScript or use a website builder or static site generator?

Last updated on 14 May 2024 This post is capturing my thoughts on this topic. As of now, I don't know enough to have a clear view. As I explore this area further over time, I plan to use this post to capture my learnings and views. One of the text/video intro/tutorials for Jekyll or Gatsby that I saw recently, said that one of the reasons for using them is to avoid repeating (HTML) code in the various pages of a website, and gave an example of header and footer, if I recall correctly. It said that if changes have to be made to this repeated header and footer (HTML) code, then the changes will have to be done repeatedly for all the pages using them. That set me thinking. I thought of HTML frames and I wondered why I had not seen any coverage of that (as far as I can recall) in the HTML 5 tutorial I had been through. Some browsing led me to an article that gives the reasons why HTML frames have been made obsolete by w3.org in HTML5: HTML Frames Are Obsolete In HTML5: Here's How T

Notes about Static Site Generators: Jekyll, Gatsby, Next.js

Last updated on 15 May 2024 https://jekyllrb.com/ "Markdown, Liquid, HTML & CSS go in. Static sites come out ready for deployment." .. " GitHub Pages is powered by Jekyll, so you can easily deploy your site using GitHub for free—custom domain name and all." Nice text tutorial about using Jekyll to create a blog site. The associated github repo is shared and one can run the app to see the blog site in operation. I have not tried out Jekyll coding but just browse-reading through the article and github repo and checking out the blog app, has given me some idea of how Jekyll can be used to more easily create static sites which use a shared layout. There is support for templates too but I don't know how extensive this support is, and whether the free templates collection is sophisticated enough for various static website needs. The article: Jekyll Tutorial: How To Create a Static Website, https://kinsta.com/blog/jekyll-static-site/ . Gatsby (software), https://e

Free HTML and CSS templates sites

https://www.free-css.com/free-css-templates https://templatemo.com/ (has free and premium) https://themewagon.com/ https://html5up.net/ (has free and premium) https://startbootstrap.com/themes https://www.zerotheme.com/ (has free and premium) https://www.html5xcss3.com/ https://www.w3schools.com/w3css/w3css_templates.asp https://www.tooplate.com/free-templates   Note that OceanWP free theme on WordPress.org has a collection of templates which seem to be quite impressive. But the problem seems to be that these templates have to be used only in WordPress environment and cannot be used in an HTML & CSS static website.

Free Wordpress.org installation on local Windows PC is tricky but doable; Exploring using it for creating websites

Last updated on 14 May 2024 Summary After some stumbling on WAMP installation on my local Windows PC and some exploration of individual authors' instructions for installation of XAMPP (instead of WAMP) and WordPress.org on local Windows PC, I was successful in installing and running WordPress locally without spending any money (free). I could also install a plugin (Elementor) in it for free which is not allowed in WordPress.com free plan. As of now, I do not know how useful the free plugins, themes and templates in WordPress.org are, and whether one needs paid plugins, themes and templates to build decent quality websites and small to medium complexity web apps, but I hope to learn about that and also document that learning in a post in the future. In contrast to WordPress.org, I think WordPress.com free plan is very inadequate to build websites let alone web apps.  Even after one creates the WordPress website or web app., hosting it may involve some additional expense as one would

Notes on website builders and Content Management Systems (CMS)

Last updated on 14 May 2024 Notes WordPress only content of this post has been moved to  Free Wordpress.org installation on local Windows PC is tricky but doable; Exploring using it for creating websites . But this post does have more general content about CMS some of which covers WordPress too. Related post: Notes about Static Site Generators: Jekyll, Gatsby, Next.js,  https://raviswdev.blogspot.com/2024/05/notes-about-static-site-generators.html Related post: Notes on: Hand-code simple/medium complexity static websites in HTML, CSS and JavaScript or use a website builder or static site generator?,  https://raviswdev.blogspot.com/2024/05/notes-on-handcoding-static-websites.html Headless CMS explained in 1 minute (the text article takes longer, the video link in it is 1 minute 15 secs. long): https://www.contentful.com/headless-cms/ Nice article that seems to give a good overview of various types of web(site/app) development. Article was "was originally published in November 2018

Finished 1st round of Next.js official tutorial; Some thoughts about Next.js

Today I finished a first round of the official Next.js tutorial:  https://nextjs.org/learn . The resultant app is deployed on Vercel with valid user credentials being: Email: user@nextmail.com, Password: 123456. A related post is:  Notes on learning Next.js . The final tutorial app. demonstrates quite a few interesting features like optimized fonts and images that avoid CLS (Cumulative Layout Shift), streaming and loading skeletons, search using database query instead of client side filtering, pagination, React Server Actions to mutate data, graceful error handling, authentication using NextAuth.js and adding metadata to app. The app. has tons of code with TypeScript and Tailwind code being somewhat new to me and so  a little challenging. But the invoices part of the final app. which is the focus of the tutorial, looks good. So the tons of code may be worth it.  An interesting thought is to see if such a UI is possible with leading low code or no code tools/dev. platforms. If that

Windows PowerShell script and commands to list files and folders modified in past x days excluding specified folders like .git and node_modules

Last updated on: 5 May 2024 Quick-Info ExcludeDirsRecurseListFilesDirs.ps1 : Recursively outputs Get-ChildItem returned object for files and directories of current working directory OR user specified directory but excludes folders and their contents present in $ExcludeFolders variable in script. Usage: script-name [optional-path] | next-cmd  ========================================= Below sections are in the form of notes as I was exploring a solution. The bottom of the post covers the solution. The number of folders and files within .git and node-modules results in long output of Windows commands like: forfiles /S /C “cmd /c echo @path” /D 30-04-2024 Ref: (My post:) Searching for files modified in a period in Windows Explorer and in Command Line . That makes commands like the above unviable for project folders using Git or Node Package Manager (npm). I should be able to exclude folders like .git and node_modules (and .next for Next.js projects) at least in the output but ideally in th

Notes on Docker and Kubernetes

Nice short video about docker concepts: 100+ Docker Concepts you Need to Know,  https://www.youtube.com/watch?v=rIrNIzy6U_g , 8 min 27 secs by Fireship, published in March 2024.  Nice short video about Kubernetes: Kubernetes Explained in 6 Minutes | k8s Architecture,  https://www.youtube.com/watch?v=TlHvYWVUZyc , 6 min 27 secs by ByteByteGo, published in Jan. 2023.

Notes on Low Code Dev. Platforms

I am interested to know how to quickly provide small to medium size web apps. In that context, low code and no code development platforms seem to be quite fascinating. But there seems to be a plethora of such development platforms! And the pricing for many seem to be based on per user which I presume is users using the app. That may be a big tripping point for many small organizations especially charitable organizations. One doubt I have is that if some of these low code dev. platforms are great then why all this buzz about MERN stack, Ruby on Rails etc. Instead the buzz should be about few of these dev. platforms that are great. I think I will get some idea of the answer only after I explore some of these low code dev. platforms myself. Plan to do that sometime in the near future, time permitting. ===================== 7 Best Low Code Development Platforms in 2024 [Full Software Demo], https://www.youtube.com/watch?v=NHcY7VetK10 , 15 min. 17 secs., published by Business Solution in F