- Downlaod OS from app store
- After download, Installer will open automatically. Quit installer via
Sonoma > Quiton top left hand corner - Download
runOnMac.shfile below - Open terminal and go to the location where file is downloaded
- run
chmod 777 ./runOnMac.shto give full permission - run
sudo ./runOnMac.shfile to extract.isofile of the OS installer (You may have to type in user password)
| #!/bin/bash | |
| # For any other installation, make of compatibilities of distributions. Find Distribution relevant package and replace with the curl urls | |
| set -e | |
| NODE_VERSION="20.0.0" | |
| NODE_COMMAND="node" | |
| install_node_ubuntu() { |
| import React, { useEffect, useRef } from 'react'; | |
| import { Canvas, useFrame } from '@react-three/fiber'; | |
| import { XRCanvas, XRController, Hands, DefaultXRControllers } from '@react-three/xr'; | |
| const XRComponent = () => { | |
| const videoRef = useRef(); | |
| useEffect(() => { | |
| // Access the XR session using the useXR hook | |
| const { gl, camera, scene, controller } = useXR(); |
| #!/bin/bash | |
| # Define your certificate and key file names | |
| CERT_FILE="ssl.crt" | |
| KEY_FILE="ssl.key" | |
| DESCRIPTION="." # Customize the description | |
| # Generate a self-signed SSL certificate with a description | |
| openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout $KEY_FILE -out $CERT_FILE -subj "/CN=$DESCRIPTION" |
| # https://github.com/nvm-sh/nvm/blob/v0.39.3/install.sh | |
| # Go to home location | |
| cd $HOME | |
| # Create bashrc file if not exists | |
| touch ./bashrc | |
| # Get shell script to install nvm | |
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash |
| const winHtml = `<!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Window with 3D Scene</title> | |
| </head> | |
| <body> | |
| <canvas id="canvasScene"></canvas> | |
| <script type="module"> | |
| import * as THREE from 'https://unpkg.com/three/build/three.module.js'; |
| // const obj = [{a: 5, b: 6}, {a: 10, b: 8}, {a: 7, b: 2}]; | |
| // const newObj = [{a: 5, b: 6}, {a: 10, b: 8}, {a: 7, b: 2}, {a: 22, b: 16}]; //Notice last child object | |
| function addAllObjects(childObjects) { | |
| var keyNames = Object.keys(childObjects[0]); //Get first object names | |
| const addAdded = {}; // Created empty child object | |
| for(let i = 0; i < keyNames.length; i++){ | |
| addAdded[keyNames[i]] = 0; // Use names of the first object to create properties in new object | |
| } |
| import { OBJLoader } from "three/examples/jsm/loaders/OBJLoader"; | |
| import { MTLLoader } from "three/examples/jsm/loaders/MTLLoader"; | |
| import { Canvas } from "@react-three/fiber"; | |
| import { Suspense } from "react"; | |
| import { OrbitControls } from "@react-three/drei"; | |
| const MaterialData = ` | |
| # Blender MTL File: 'Tree.blend' | |
| # Material Count: 1 |
Install Redis brew install redis
Start redis server redis-server (Make sure keep server on one tab & open another terminal to operate locally)
redis-cli
Create variable SET <var_name> β<string_value>β
Fetch variable GET <var_name>
Print message ECHO β<Message_to_be_displayed>β
Test if connection is alive PING(returned PONG)
Create object HMSET <column_name> <value> <column_name> β<col_name>β
Create List LPUSH <List_name> β<Value>β\
Run the MySQL Server mysql.server start
Connecting to the Server mysql -u root -p (Password: <Hit Enter>)
Once we are in:
Creating user access ALTER USER βrootβ$βlocalhostβ IDENTIFIED BY β<New_Password>β;
Display All Databases SHOW DATABASES;
Create new User CREATE USER β<user_name>β@β%β IDENTIFIED WITH mysql_native_password BY β<password>β;
Assign complete access GRANT ALL PRIVILEGES ON *>* TO β<user_name>β@β%β;
Validating access FLUSH PRIVILEGES;
Create new Database CREATE DATABASE firstDB;
Create table inside Database USE ;\