======ABC0======
NOTE: this is a collaborative document among ALL my classes this semester. That means more people editing. Be mindful that only one person can edit the document at a time.
Only task headings have been provided. You are not expected to know how to do the task given just that description (although in some cases it can be adequately figured out). Instead, if no further information is yet present, ASK FOR DETAILS on the discord.
If something is present but needs polish: spruce it up.
If something is present but is incorrect: please fix it.
This is intended to be an informative, useful document that all can benefit from.
Those with prior experience, please be mindful not to gobble up all the low-hanging fruit from the newcomers.
=====Get on discord and into class channels=====
The link to the Lab46 discord server can be found at the top of each course home page.
=====Log into Lab46 (shell)=====
The first thing you need to do to get set up for the semester is log into the lab46 shell. If you are on a Windows or Linux device, this should be as simple as typing:
ssh jdoe123@lab46.g7n.org
into your terminal, replacing jdoe123 with the start of your CCC email
====Change lab46 password====
====Clone lab46 semester repo on lab46 (fixrepo)====
Once you have ssh'd into the lab, you will need to set up a repository for all of your projects for this semester.
This can be done with the **fixrepo** command, which will create an src/spring2025/ folder into your home folder. This folder has already been set up as a mercurial repository, and is ready to use.
Inside your spring2025 folder it might be wise to create a new folder(s) for your class/classes. This can be done with the **mkdir** command
mkdir FOLDERNAME
i.e
mkdir unix
will create a new folder named unix
Be sure to do this in your spring2025/ folder, or you will create the folder in the wrong place, and it will not be tracked!
=====Log into Lab46 wiki=====
====Change lab46 wiki password (can be same as lab46)====
=====Set up personal development system=====
====Clone lab46 semester repo on your system====
On your system of choice, Virtual Machine or Pi, open a terminal
Option 1
* If on a Pi or Debian based distro the following command should work
wget -q https://lab46.g7n.org/~wedge/piph/download -O piph
bash ./piph
Option 2
* Not taking the shortcut route, use these two commands
hg clone ssh://USER@lab46.g7n.org//var/repos/hg/user/USER ~/src
hg clone ssh://USER@lab46.g7n.org//var/repos/hg/user/USER/spring2025 ~/src/spring2025
====Create info.text file with information====
You can use a text editor like Vim or Nano to create info.text. Generally, it contains things like:
1) Your name
2) A good way to reach you (for example, email address)
3) Which program you are enrolled in
4) Your discord username
You can use "vim info.text" or "nano info.text" to create the file and start typing.
====Create, compile, and execute hello.c====
Create the hello.c file using a text editor
vim hello.c
Then write a simple program that outputs "Hello World" to the console
Finally, compile the file using GCC or some other compiler
gcc -Wall -std=gnu18 hello.c -o hello
To execute the code type in
./hello
====Add, Commit, Push changes to repo====
====hg add====
Once you have created files you need to add them to the repository. You can use **hg add** to automatically add all new files (with some exceptions)
hg add
You can use **hg status** to see what files have been added
====hg commit====
The command **hg commit** will save all of the changes that have been made (only the files that appear in **hg status** will be committed)
hg commit
====hg push====
Apply the changes to the repository with **hg push**
hg push
=====Pull and Update project changes on Lab46=====
====hg pull====
To get the changes from mercurial use **hg pull** from within src
cd ~/src
hg pull
====hg update====
To create files/apply changes use **hg update** from within src
hg update
=====Submit project files on lab46=====
Submit with "submit DESIG abc0 file1 file2 file3"
=====Customize journal title and intro, edit week1 entry=====