Software Development & Operating Systems

Notes on Software Development & Operating Systems

Adding files from a non github project to a newly created github project

One comprehensive way to do this is to create a staging directory for the project files you want to add to your github repository. Then click the [Upload Files] button on your github repository. Now drag and drop the directory structure and files you want into the github ‘Drag files here to add them to [...]

Posted in Git, GitHub, Version Control | Comments Off

How to show hidden files and folders in Finder

My use case was that using finder, I wanted to see the files in the .idea folder in an intelliJ project. To show hidden files and folder in finder, use this shortcut: CMD + SHIFT + . using this shortcut a second time will once again hide hidden files and folders.

Posted in Mac OS, Operating System | Comments Off

How to determine type of RAM installed in CentOS

su – dmidecode –type 17 I have not determined if this command works in other linux distros.

Posted in CentOS, Linux, Operating System, Uncategorized | Comments Off

How to determine CPU type in CentOS

lscpu I have not verified if this works in other linux distros.

Posted in CentOS, Operating System | Comments Off

Options for spring.jpa.hibernate.ddl-auto

validate: validate the schema, makes no changes to the database. update: update the schema. create: creates the schema, destroying previous data. create-drop: drop the schema when the SessionFactory is closed explicitly, typically when the application is stopped.

Posted in Hibernate, JPA, Spring, SpringBoot | Comments Off

Configure SpringBoot with H2 Database

Prerequisite: Go to and create a new SpringBoot project with Web, H2, and DevTools for dependencies. Import new project into STS (Spring Tools Suite). Additions to Open /src/main/resources/ and add the following lines: # H2 spring.h2.console.enabled=true spring.h2.console.path=/h2 # Datasource spring.datasource.url=jdbc:h2:file:~/test spring.datasource.username=sa spring.datasource.password= spring.datasource.driver-class-name=org.h2.Driver spring.jpa.database-platform=org.hibernate.dialect.H2Dialect spring.jpa.generate-ddl=true spring.jpa.hibernate.ddl-auto=validate NOTE: If you want your database [...]

Posted in h2, Hibernate, JPA, SpringBoot | Comments Off

Determine what Product Key was used for a Windows Install

This works for Windows 7, 8, and 10: The use case for this is that you have several licensed copies of the same Windows version, but do not remember which key you used on which computer. Open the Start Menu and type: cmd Type the following at the command prompt: slmgr -dli After about 15 [...]

Posted in Operating System, Windows | Comments Off

JPA: How to use a base class for your entities

In order for to extend a base class from you entities, you must use the annotation @MappedSuperclass on the base class: @MappedSuperclass public abstract class AbstractBaseEntity Then in your entity class extend the class as you usually would: @Entity public class MyConcreteEntity extends AbstractBaseEntity

Posted in JPA | Comments Off

How to resolve LazyInitializationException with SpringMVC using JPA with Hibernate

Follow the below steps if you see the org.hibernate.LazyInitializationException being thrown while trying to render your page. Add a filter to your web.xml file: <filter> <filter-name>SpringOpenEntityManagerInViewFilter</filter-name> <filter-class></filter-class> </filter> <filter-mapping> <filter-name>SpringOpenEntityManagerInViewFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>

Posted in Hibernate, JPA, SpringMVC | Comments Off

Install CentOS 7 Server with GUI

Boot from the CentOS 7 Installation DVD and select Install CentOS 7. Select language to use during the installation process and click [Continue]. You should now be at the Installation Summary screen. Under SOFTWARE, click Software Selection. Select Server with GUI and click [Done]. Note for this next part of configuring RAID 0 at the [...]

Posted in CentOS, Linux, Operating System | Comments Off