Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
Last active February 10, 2025 07:21
Show Gist options
  • Save MohamedAlaa/58206c8ba8e3e8510496 to your computer and use it in GitHub Desktop.
Save MohamedAlaa/58206c8ba8e3e8510496 to your computer and use it in GitHub Desktop.
osx computer info in terminal
#!/bin/bash
echo "--------------------------------------------------------------------------------"
uname -a
echo "--------------------------------------------------------------------------------"
MEMORY=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print $1 $2 $3}'`
echo "$MEMORY"
echo "--------------------------------------------------------------------------------"
CORES_COUNT=`sysctl hw.ncpu | awk '{print $2}'`
echo "CPU"
sysctl -n machdep.cpu.brand_string
echo "$CORES_COUNT Cores"
echo "--------------------------------------------------------------------------------"
df -h
echo "--------------------------------------------------------------------------------"
echo Local IPs
ifconfig | grep 'inet ' | awk '{print $2}' | sed 's/addr:/ - /g'
echo "--------------------------------------------------------------------------------"
SERVER_NAME=`hostname`
echo "SERVER INFO: $SERVER_NAME"
echo "SERVER ROLE: solo"
echo "GEM_HOME: $GEM_HOME"
echo "--------------------------------------------------------------------------------"
@x1unix
Copy link

x1unix commented Feb 17, 2017

Why SERVER ROLE is hardcoded?

@leonardjien
Copy link

Hardcoding server roles can enhance system stability. By having predefined roles, systems can ensure that each server operates within specific parameters, reducing the risk of misconfigurations that could lead to failures. Predefined roles allow for optimization tailored to specific functions. For example, a server designated as a web server can be optimized for handling HTTP requests, while a database server can be tuned for data storage and retrieval. Hardcoding roles can help enforce security measures of geometry dash lite. By limiting the functions a server can perform, it reduces the attack surface and ensures that only necessary services are running, thereby improving overall security.

@jefferyreed
Copy link

Server roles that are hardcoded can improve system stability. Systems can guarantee that every server functions within predetermined parameters by assigning established responsibilities, which lowers the possibility of configuration errors Block Blast that could result in failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment