Skip to content
Snippets Groups Projects
Commit 65cee774 authored by Danny McDonald's avatar Danny McDonald
Browse files

Merge branch 'patch-1' into 'master'

patch-1 to master, cleanup Henrik's files

See merge request !26
parents 223d28d7 8f988a69
No related branches found
No related tags found
1 merge request!26patch-1 to master, cleanup Henrik's files
## Feeling the Past
This is the project folder for my DigiZeit-project named *Feeling the Past*. *Feeling the Past* is a historiographical learning game based on the *Marugoto*-engine. The main focus lies on how objects can be used as historical sources. About the motivation for the project more can be read in the session-7.md, which was the introduction for the other students at the beginning of the semester. The estimated playtime is between 15 and 30 minutes. At the moment the game is not clear, whether the game will be accessible to the public.
The repository for the game is hosted on GitHub, found with the following link: [Feeling the Past](https://github.com/henokemp/lit-feelingthepast)
## Linux Journey
After being curious for a while and playing with the thought of trying out Linux I -- motivated by Daniel McDonald -- decided that trying out a new OS parallel to the other new digital stuff from this course shouldn't be too big of a bother. So I began my *Linux Journey* as described in journey_henrik.md. It's not necessarily limited to Linux as it progressed parallel to learning Git. At the end are some commands copied, which were commented by Daniel McDonald or that I began using on the way.
Personally I feel like I've found a new home in Linux, for working that is. It has a rather steep learning curve but the productivity benefits are definitely worth it. I had the luck to have someone to ask if I ran into problems but the internet also holds a plethora of information and solutions for any problem. I would recommend Linux for anyone wanting to be more productive in their workflow and to have more influence over their OS.
\ No newline at end of file
......@@ -63,4 +63,71 @@ So, I like Linux. Outside the whole Git/Atom/coding stuff it's just really nice
I'm currently thinking about and preparing to write either already my current papers or my DigiZeit paper in LaTeX. My expectation is that the learning experience is going to be similar, but the nerves not lost over Word formatting will be worth it.
Let's see how that'll go, I'm going to keep updating this .md or a separate one. Maybe even in a LaTeX based PDF file.
\ No newline at end of file
Let's see how that'll go, I'm going to keep updating this .md or a separate one. Maybe even in a LaTeX based PDF file.
### Competent Linux guidance
To have Dannys work not be in vain, I'll be adding some of his "better-written" linux summaries below.
Since you might find yourself inside the Terminal (command prompt) more often on Linux, do try to document which commands you find yourself using, and what they do. You'll probably paste a few in from Google/stack overflow answers. Some of the common commands:
`ls` -> show contents of directory (ls -alh, show it more readably)
`cd` -> change directory (learn cd /, cd ~, cd .. for moving around using relative, rather than absolute paths to things)
`find` -> print paths to files/folders matching some criteria
`grep` -> use regular expressions to find lines in files that match some search string
`cat <file.txt>` -> print contents of file to terminal
`less <file.txt>` -> print the first part of a file, allowing you to scroll up and down. ctrl+c to get out
`echo "something"` -> print "something" in terminal
`mkdir my-folder/touch file.md` -> make new folders/files
`history` -> print my previously entered commands
`apt and apt-get` -> linux commands for installing packages
`clear` -> clear your terminal screen
`yes` -> keep printing the word yes, truly amazing command
`mv <source-path> <target-path>` -> move a file from source to target
`cp -R <source-dir> <target-dir>` -> copy a directory and its contents recursively to a new location
`rm file.txt` -> delete a file
`rm -r -f <directory>` -> remove a folder and everything inside it recursively. be careful with this, you could rm most of your system by mistake...
`man <other-command` -> show me the manual (i.e. documentation) for another command. Learn to read these man pages, they typically have all the info you need
`ctrl+r` -> find from your command history (really useful, learn to use this one as an instinct!)
`git` -> this one you know!
All programming is, is stringing together a bunch of commands in a file, and then executing that file (i.e. running the script). For example, you could write a nice little script that pulls the latest for every git repository in your home folder. It might look something like:
```bash
!/usr/bin/env bash
cd ~ # go to your home folder
cd digizeit # go into our repo, assuming it was cloned to ~/digizeit
git checkout master # make sure you're on master branch
git pull # get latest
cd .. # go to parent directory
cd <other-project> # some other project you're working on, same thing
git checkout master
git pull
cd ~
echo "Finished! I am now a computer programmer"
```
The first line of the script, called a shebang, tells your system which language the program is written in (bash, the default language of your terminal). You'd save this as `update.sh`, then you'd tell Linux you want to be able to execute the file with:
```chmod +x update.sh```
You can then do ./update.sh to run your script. If it prints the Finished line, it worked, and you're a programmer now. You can even move the file to /usr/bin, and then you can run it from any directory at any time just by typing update.sh! But, since you're a programmer now, you actually make a repository containing all your cool scripts, and you keep this and other scripts that you write under version control in that repository. That way you can improve it over time, while keeping its history, blah blah.
#### One interesting thing to try:
Open a terminal and use the following command to install telnet:
```sudo apt install telnet```
And then use this command to watch Star Wars in ASCII art.
```telnet towel.blinkenlights.nl```
One other thing you'll want to do quite quickly, install Atom and/or Sublime Text, and then set those in terminal as your default editor, so that files are opened for editing using those apps, rather than in the terminal's default (terminal-based) editor (nano or vim, both of which require some practice).
https://askubuntu.com/questions/777410/how-to-set-atom-editor-to-main-editor
These instructions tell you something really valuable, that you can add lines to this `~/.bashrc file`. This file contains your terminal preferences and shortcuts and so on. For example, I add:
```alias la="ls -alh"```
And then do `source ~/.bashrc` to reload the settings. This gives me a new command, `la`, which is just the same as doing `ls -alh` but shorter. So yeah, back to the *point*, you use this same preferences file to store your preferred text editor, so that when you do things in terminal requiring a text editor, it'll open the file with Atom, much easier than learning `vim` right now.
\ No newline at end of file
## Commands
Upon popular demand (Danny), I will share the commands I encounter on my journey.
Central for one are the git commands, which I'm slowly getting used to. So the basic being:
`git fetch`
`git pull`
`git push`
`git push origin master`
`git branch`
`git checkout <branchname>`
`git push origin <branchname>`
There are tons of different lists of git commands on the Internet so I won't add all of them here.
Other than that I'm currently figuring out some annoyances I still have, for example that the touchpad is responding badly for a few seconds after I login. The guides on the internet include commands to for example show all input devices `xinput list` or how to get a list of all installed packages `apt list --installed`. Once again, all the `sudo apt-get install <package>` I think are really cool, because they cut all the unnecessary crap from installing new software.
The ones Danny listed in [here](https://gitlab.uzh.ch/lit/digizeit/merge_requests/13) are really useful, especially `ctrl+r`.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment