<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.itcollege.ee/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sahuts</id>
	<title>ICO wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.itcollege.ee/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sahuts"/>
	<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php/Special:Contributions/Sahuts"/>
	<updated>2026-05-07T02:31:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=I253_Presessional_Informatics&amp;diff=123985</id>
		<title>I253 Presessional Informatics</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=I253_Presessional_Informatics&amp;diff=123985"/>
		<updated>2017-09-04T10:20:02Z</updated>

		<summary type="html">&lt;p&gt;Sahuts: /* Fourth session: Git ja SSH keys */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==General information==&lt;br /&gt;
&lt;br /&gt;
Oh no, I am not cyber warrior! No worries, just head over to [https://wiki.itcollege.ee/index.php/I253_Informatika_eelkursus Estonian translation] of the same course.&lt;br /&gt;
&lt;br /&gt;
ECTS : 2 &lt;br /&gt;
4&lt;br /&gt;
Grading: Test + homework&lt;br /&gt;
&lt;br /&gt;
Lecturer: Lauri Võsandi with tutors Arti Zirk, Marvin Martinson, Kristjan Peterson, Taavi Teearu, Mohanad Aly&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Prerequisites and target audience==&lt;br /&gt;
&lt;br /&gt;
Course aims to prepare freshmen for lectures read during fall-semester and to familiarize themselves with IT college&#039;s infrastructure. Powerusers are probably able to learn everything on the fly. It is advised to fill your voluntary subject points from other subjects.&lt;br /&gt;
&lt;br /&gt;
==Course goals and content==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Topics aren&#039;t nescessarily in correct order, but to pass this course you should know following things:&lt;br /&gt;
&lt;br /&gt;
* ITC technical manuals, printing, e-mail forwarding and using enos web server.&lt;br /&gt;
* Basics of computer hardware, so you know which computer to purchase.&lt;br /&gt;
* Keyboard shortcuts [https://support.microsoft.com/en-us/kb/126449 for Windows users], [https://help.ubuntu.com/community/KeyboardShortcuts for Ubuntu users] - it&#039;s a bit embarrasing if you are using mouse like a savage instead of Alt + Tab.&lt;br /&gt;
* Managing files [https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/app_win_explorer.mspx?mfr=true in Windows], in Ubuntu. You know how to copy, move, delete files. Distinguish files from folders. Can switch on showing file extensions and hidden files.&lt;br /&gt;
* Using text editor [https://notepad-plus-plus.org/ Notepad++] in Windows, [https://wiki.gnome.org/Apps/Gedit Gedit] in Ubuntu. Use correct indentation, line breaks and charset (UTF-8).&lt;br /&gt;
* Using SSH to manage servers and other computers via command line (access, copy, relocate, delete, modify files) [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY] and for GUI access via SFTP [https://winscp.net WinSCP]&lt;br /&gt;
* Basics of  version control systems, can distinguish software from service e.g. [https://git-scm.com/ Git] vs [https://github.com/ GitHub]. Knows how to add files to version control system  (add-commit-push) and open ones code on GitHub.&lt;br /&gt;
* Basics of virtualization, can dual-boot between Windows and Ubuntu in a virtual machine and can manage doing the same to personal computer. Has heard of assigning resources to virtual machines, knows the difference between B, KiB, kB, B, MiB, MB, GiB, Gb. &lt;br /&gt;
* Can figure out what is connected to where inside the computer (PCI, USB, SATA).&lt;br /&gt;
* There will be additional bits and pieces here in the future...&lt;br /&gt;
&lt;br /&gt;
==Grading==&lt;br /&gt;
&lt;br /&gt;
In order to pass the course:&lt;br /&gt;
&lt;br /&gt;
* Set up a web page in enos web server&lt;br /&gt;
* Store your homepage files in Git repository at GitHub&lt;br /&gt;
* Set up GitHub authentication using SSH keys&lt;br /&gt;
* Set up passwordless authentication between your personal computer and school servers (enos, doris) to access command-line and transfer files&lt;br /&gt;
* Set up software necessary to do homework in other courses eg Java 8, Intellij, Eclipse, PuTTY, Git Bash, notepad++, Atom.io, Sublime, Ubuntu, web server etc.&lt;br /&gt;
* Complete a test online, cybersecurity students 16:00 18. october 2016&lt;br /&gt;
* Gotten familiar with virtualization, has installed Windows and Ubuntu into a virtual machine in one of the labs&lt;br /&gt;
* [http://enos.itcollege.ee/~lvosandi/check.html Grading bot] checks your progress once an hour&lt;br /&gt;
&lt;br /&gt;
==Homework==&lt;br /&gt;
&lt;br /&gt;
Go through following CodeAcademy tracks:&lt;br /&gt;
&lt;br /&gt;
* [https://www.codecademy.com/learn/learn-the-command-line command-line]&lt;br /&gt;
* [https://www.codecademy.com/learn/web HTML &amp;amp; CSS]&lt;br /&gt;
* [https://www.codecademy.com/learn/learn-git Git]&lt;br /&gt;
&lt;br /&gt;
==Lectures/labs==&lt;br /&gt;
&lt;br /&gt;
===First session: Introduction to Windows and personalisation of enos homepage===&lt;br /&gt;
In windows you can log in using user: &amp;quot;kylaline&amp;quot; and password:&amp;quot;kylaline&amp;quot;. Log in with ID-card using Chrome or Firefox and reset your password [http://ois2.ttu.ee SIS]. ID-card does not work with Microsoft Edge! Write down your IT College (ITC) username, which you can find from &amp;quot;My Data&amp;quot;. Log out of your guest account and try to log in using the username and password which you obtained from SIS. After that check whether you are able to log in to [http://wiki.itcollege.ee Wiki] as well as [https://mail.ttu.ee e-mail server]. When logging into outlook, username is using format &amp;quot;username@itcollege.ee&amp;quot;. All necessary links can be found [http://www.itcollege.ee/ IT College homepage] top left corner.&lt;br /&gt;
&lt;br /&gt;
In Windows &#039;This PC&#039; should have four drives in it:&lt;br /&gt;
&lt;br /&gt;
* C: - Location of running Windows. SSD - not much space, but it&#039;s fast&lt;br /&gt;
* D: - This is regular HDD, lots of space but slower. Virtual machines should go there in the future.&lt;br /&gt;
* H: - This contains everything you have in enos.itcollege.ee server, also contains public_html folder that can be accessed from a web browser using address http://enos.itcollege.ee/~username/&lt;br /&gt;
* U: - This is public folder, using which you can share files with one-another. Only for public content - no pirates allowed.&lt;br /&gt;
&lt;br /&gt;
Create a file called index.html onto H: drive into public_html folder. Create content that introduces you - Who are you? Where are you from? Add a picture. Example can be found [http://enos.itcollege.ee/~arzirk/ here].&lt;br /&gt;
To create index.html get yourself a decent text editor. For example [https://notepad-plus-plus.org/download/v6.9.2.html Notepad++], choose portable version in .zip file, because you have no rights to install software to the system.&lt;br /&gt;
Microsoft word is for word processing. It IS NOT a text editor.&lt;br /&gt;
Notepad++ should be installed during next week.&lt;br /&gt;
Since you have no previous knowledge of HTML, don&#039;t worry, that&#039;s why you are here. You will have a course explaining everything regarding web application development in spring semester.&lt;br /&gt;
&lt;br /&gt;
For now, you can use following code to make yourself an introductive web page:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;meta charset=&amp;quot;utf-8&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;Hey, I&#039;m Lauri from Tallinn, Estonia&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;!-- These two are from cloudfront server --&amp;gt;&lt;br /&gt;
    &amp;lt;img src=&amp;quot;https://d1qb2nb5cznatu.cloudfront.net/users/18344-large?1405448591&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;img src=&amp;quot;//d1qb2nb5cznatu.cloudfront.net/users/18344-large?1405448591&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- These four are from enos server --&amp;gt;&lt;br /&gt;
    &amp;lt;img src=&amp;quot;http://enos.itcollege.ee/~lvosandi/pics/lauri.jpeg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;img src=&amp;quot;//enos.itcollege.ee/~lvosandi/pics/lauri.jpeg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;img src=&amp;quot;/~lvosandi/pics/lauri.jpeg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;img src=&amp;quot;pics/lauri.jpeg&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- Examples that definitely will NOT work --&amp;gt;&lt;br /&gt;
    &amp;lt;img src=&amp;quot;/home/lvosandi/public_html/pics/lauri.jpeg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;img src=&amp;quot;H:\public_html\pics\lauri.jpeg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;img src=&amp;quot;pics\lauri.jpeg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have done all of the above, try to access files on enos server using FileZilla. FileZilla is preinstalled in Windows. You can also install it to your personal computer or use WinSCP. If you want to mount your private folder as it has been mounted on Windows workstations you can use [http://www.swish-sftp.org/ Swish].&lt;br /&gt;
&lt;br /&gt;
Connecting FileZilla:&lt;br /&gt;
* hostname: enos.itcollege.ee&lt;br /&gt;
* username: &amp;lt;your-SIS-username&amp;gt;&lt;br /&gt;
* password: &amp;lt;your-SIS-password&amp;gt;&lt;br /&gt;
* port: 22&lt;br /&gt;
&lt;br /&gt;
Make sure you can access your folder, try to upload/download files-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To access the command line from Windows you can use [https://the.earth.li/~sgtatham/putty/latest/x86/putty.exe PuTTY]. Use [https://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe PuTTYgen] to generate public/private key pair, make sure you save the private file in a file. Log in to server using PuTTY, type your username after &amp;quot;log in as:&amp;quot; then enter the password. Copy the public key from PuTTYgen window, run &amp;lt;code&amp;gt;cat &amp;gt;&amp;gt; .ssh/authorized_keys&amp;lt;/code&amp;gt;, paste the public key, hit Enter to add newline and hit Ctrl-D twice to end the input.&lt;br /&gt;
&lt;br /&gt;
To select generated key in PuTTY select on the left hand panel Connection -&amp;gt; SSH -&amp;gt; Auth -&amp;gt; Privater key file for authentication and click Browse... to select the generated file. Also set the username under Connection -&amp;gt; Data -&amp;gt; Auto-login username. Finally save these configuration changes by going back to Session section, selecting Default Settings and hitting Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Second session: Introduction to Ubuntu and creating virtual machines===&lt;br /&gt;
&lt;br /&gt;
Boot your computer to Ubuntu, if computer is in Windows restart it and while in dualboot menu select Ubuntu (NOT advanced option). You should be able to log in with the same username and password as in SIS, Outlook and Windows environment. In case of emergency keep calm and use username: &amp;quot;student&amp;quot; and password: &amp;quot;student&amp;quot; In that case drive H: will not be attached and you have no access to your files in school server.&lt;br /&gt;
&lt;br /&gt;
In Ubuntu, your home folder will be at /home/username. There are no drives C:, D: or H:, because all those rescources will be attached to folders. Drive H: familiar from Windows will be accessable in folder /home/username/Dokumendid and drive U: will be at /home/username/Avalik and D: can be found at /shared .&lt;br /&gt;
&lt;br /&gt;
To open terminal use Ctrl + Alt + T&lt;br /&gt;
&lt;br /&gt;
Some commands cherry-picked from last years I600 course:&lt;br /&gt;
&lt;br /&gt;
* Use &amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt; command to see what exact linux version are you running &lt;br /&gt;
* Use &amp;lt;code&amp;gt;uname -sr&amp;lt;/code&amp;gt; command to see what kernel version is your computer running&lt;br /&gt;
* Use &amp;lt;code&amp;gt;cat /proc/cpuinfo&amp;lt;/code&amp;gt; command to see everything there is to know about the processor your computer is running on. What&#039;s the model and how many cores does it have?&lt;br /&gt;
* Use &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; to see whether running configuration is 32- or 64 bit&lt;br /&gt;
* Use &amp;lt;code&amp;gt;cat /proc/meminfo&amp;lt;/code&amp;gt; command to see memory information. How much RAM does your computer have?&lt;br /&gt;
* Use &amp;lt;code&amp;gt;lspci -t -v -nn&amp;lt;/code&amp;gt; command to see which PCI and PCI Express devices are connected. Try to understand what is where.&lt;br /&gt;
* Use &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt; command to show all USB devices. Try to understand what is where.&lt;br /&gt;
* Use &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt; command to show all drives, how much capacity does your computer&#039;s HDD/SSD have?&lt;br /&gt;
* Use &amp;lt;code&amp;gt;xrandr&amp;lt;/code&amp;gt; command to list all video output connectors. Which resolutions are available, which one is in use?&lt;br /&gt;
* Use &amp;lt;code&amp;gt;cat /proc/asound/cards&amp;lt;/code&amp;gt; command to list all audio devices.&lt;br /&gt;
* Use &amp;lt;code&amp;gt;dmidecode&amp;lt;/code&amp;gt; to get more information about your computer. For example which frequency is your RAM running on and which socket are they using? In case you need to shop for more RAM. The cheapest upgrade possible for a computer.&lt;br /&gt;
* Use &amp;lt;code&amp;gt;ifconfig -a&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ip addr list&amp;lt;/code&amp;gt; commands to list network adapter settings&lt;br /&gt;
* Use &amp;lt;code&amp;gt;htop&amp;lt;/code&amp;gt; command to list all processes&lt;br /&gt;
&lt;br /&gt;
Download Windows 10 ISO and install it to a virtual machine created with VirtualBox. Assign 8GB of RAM and 100 GB of HDD which is located under /shared. Otherwise SSD will be filled. Download Ubuntu MATE 16.04 ISO and install it to the same virtual machine. During installation choose &amp;quot;Install alongside Windows&amp;quot;. If no such option was presented, Windows in the virtual machine was not correctly shut down. If Ubuntu should freeze while booting try to assign more cores to the virtual machine, that model of the processor does not exist with a single core.&lt;br /&gt;
&lt;br /&gt;
===Third session: Hello world in different programming languages===&lt;br /&gt;
&lt;br /&gt;
Try to create &amp;quot;Hello, World!&amp;quot; in different programming languages using Ubuntu.&lt;br /&gt;
Try to add functionality to the program. Add asking name and let the program greet user using inserted name.&lt;br /&gt;
Why is running programs so different in different languages?&lt;br /&gt;
Name strenghts and weaknesses of used programming languages?&lt;br /&gt;
Restart your computer, boot into Windows and try to do the same in Visual Studio using C#.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Python====&lt;br /&gt;
Open &amp;lt;code&amp;gt;gedit&amp;lt;/code&amp;gt; text editor, and save the following content into file &amp;lt;code&amp;gt;hello.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env python&lt;br /&gt;
print &amp;quot;Tere maailm&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open command line Ctrl + Alt + T and run file you just saved:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python hello.py&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Ruby====&lt;br /&gt;
&lt;br /&gt;
Create file  &amp;lt;code&amp;gt;hello.rb&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env ruby&lt;br /&gt;
puts &amp;quot;Hello, world!&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the program on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ruby hello.rb&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Bash====&lt;br /&gt;
Create file  &amp;lt;code&amp;gt;hello.sh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo &amp;quot;Hello, world!&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run program on command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bash hello.sh&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====C====&lt;br /&gt;
Create file  &amp;lt;code&amp;gt;hello.c&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
void main() {&lt;br /&gt;
    printf(&amp;quot;Hello, world!\n&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Compile program on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
gcc hello.c -o hello&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run program in file hello:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./hello&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Java====&lt;br /&gt;
Create file &amp;lt;code&amp;gt;HelloWorld.java&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorld {&lt;br /&gt;
    public static void main(String[] args) {&lt;br /&gt;
        System.out.println(&amp;quot;Hello World!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Compile on command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
javac HelloWorld.java&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run compiled Java bytecode in file &amp;lt;code&amp;gt;HelloWorld.class&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
java HelloWorld&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Fourth session: Git and SSH keys===&lt;br /&gt;
&lt;br /&gt;
This time we&#039;ll take a look how Git works and how to set up public key authentication between your personal computer, GitHub and enos.&lt;br /&gt;
&lt;br /&gt;
Proceed to do the development portion of your homepage on your computer:&lt;br /&gt;
&lt;br /&gt;
* If necessary install Git on your Ubuntu box: &amp;lt;code&amp;gt;apt install git tig gitg&amp;lt;/code&amp;gt;, Windows users can check out [https://git-for-windows.github.io/ Git Bash]&lt;br /&gt;
* Register account at GitHub&lt;br /&gt;
* Create a repository for your homepage at GitHub&lt;br /&gt;
* Set up SSH authentication between your own computer and GitHub server using &amp;lt;code&amp;gt;ssh-keygen -t ecdsa -P &amp;quot;&amp;quot;&amp;lt;/code&amp;gt;, dump public key on the terminal using &amp;lt;code&amp;gt;cat ~/.ssh/id_ecdsa.pub&amp;lt;/code&amp;gt; and paste it to GitHub web page (Settings -&amp;gt; SSH and GPG keys), detailed instructions [https://help.github.com/articles/generating-an-ssh-key/ here]&lt;br /&gt;
* Clone the repository to your computer using &amp;lt;code&amp;gt;git clone git@github.com:username/repo.git&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cd repo&amp;lt;/code&amp;gt;&lt;br /&gt;
* Add files to newly created directory, eg index.html and some images&lt;br /&gt;
* Tell Git to keep track of the files &amp;lt;code&amp;gt;git add index.html&amp;lt;/code&amp;gt;&lt;br /&gt;
* Configure your full name for Git commits: &amp;lt;code&amp;gt;git config --global user.name &amp;quot;Lauri Võsandi&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Configure your e-mail for Git commits: &amp;lt;code&amp;gt;git config --global user.email lauri.vosandi@gmail.com&amp;lt;/code&amp;gt;&lt;br /&gt;
* Make your first commit using &amp;lt;code&amp;gt;git commit&amp;lt;/code&amp;gt;, Git asks for the description, this should answer to question &amp;quot;what was added/changed/deleted?&amp;quot;&lt;br /&gt;
* Publish your changes using &amp;lt;code&amp;gt;git push&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now proceed to do the administration portion on enos.itcollege.ee by setting up your homepage there so it is connected to the Git repository&lt;br /&gt;
&lt;br /&gt;
* Set up SSH public key authentication between your computer and enos.itcollege.ee using &amp;lt;code&amp;gt;ssh-copy-id username@enos.itcollege.ee&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set up public key authentication between your account on enos.itcollege.ee and GitHub, the same way you did for your computer above.&lt;br /&gt;
* Move the old webpage with: &amp;lt;code&amp;gt;mv ~/public_html ~/homepage_backup&amp;lt;/code&amp;gt;&lt;br /&gt;
* Clone the repository to enos: &amp;lt;code&amp;gt;git clone https://github.com/username/repo/ ~/public_html&amp;lt;/code&amp;gt;&lt;br /&gt;
* Check that your homepage is back up and running by going to http://enos.itcollege.ee/~school-user-account&lt;br /&gt;
&lt;br /&gt;
Now after all the stuff has been set up, the daily development cycle looks like this:&lt;br /&gt;
&lt;br /&gt;
* In your development machine edit files, use &amp;lt;code&amp;gt;git add filename&amp;lt;/code&amp;gt; to tell Git to remember these changes, make a commit using &amp;lt;code&amp;gt;git commit&amp;lt;/code&amp;gt; and publish changes using &amp;lt;code&amp;gt;git push&amp;lt;/code&amp;gt;&lt;br /&gt;
* In your production environment, that is the enos server you just do &amp;lt;code&amp;gt;git pull&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get on the track with Git, manual isn&#039;t very helpful. Instead try to follow some [http://rogerdudler.github.io/git-guide/ Git for newbies] guide.&lt;br /&gt;
&lt;br /&gt;
Git should track *only* source code files, any kind of temporary/compiled/generated garbage does not belong to Git repo. Use  &amp;lt;code&amp;gt;.gitignore&amp;lt;/code&amp;gt; file to tell Git to ignore such files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
# Text editor backup files&lt;br /&gt;
*~&lt;br /&gt;
*.swp&lt;br /&gt;
*.bak&lt;br /&gt;
*.tmp&lt;br /&gt;
 &lt;br /&gt;
# Java project&lt;br /&gt;
build/&lt;br /&gt;
*.class&lt;br /&gt;
 &lt;br /&gt;
# Python project&lt;br /&gt;
*.pyc&lt;br /&gt;
 &lt;br /&gt;
# C/C++ project&lt;br /&gt;
*.so&lt;br /&gt;
*.o&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do not just copy-paste the whole thing, consider what kind of project you&#039;re working on.&lt;br /&gt;
&lt;br /&gt;
===Fifth session: Importing virtual appliances===&lt;br /&gt;
&lt;br /&gt;
There is a lot of software available as virtual appliances (*.ova files). This means that a piece of software has been packaged as a virtual machine harddisk image plus the accompanying metadata which includes network configuration etc.&lt;br /&gt;
Many lecturers as well provide a *.ova file to work on the labs.&lt;br /&gt;
&lt;br /&gt;
In this example we&#039;ll download a Ubuntu server virtual appliance from  http://upload.itcollege.ee/ova/lamp.ova&lt;br /&gt;
to practice more with playing around with SSH and accessing resources on a server.&lt;br /&gt;
&lt;br /&gt;
Before importing it to VirtualBox create a host-only adapter in VirtualBox by clicking Preferences in the VirtualBox main windows&#039; menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Add-host-adapter.png]]&lt;br /&gt;
&lt;br /&gt;
From VirtualBox&#039;s main windows&#039; menu select Import Appliance ... and point to the file you just downloaded.&lt;br /&gt;
&lt;br /&gt;
Start the virtual machine and once it has booted up try to:&lt;br /&gt;
&lt;br /&gt;
* In web browser open up http://192.168.56.101&lt;br /&gt;
* Try to access  MySQL server web interface, username root, password student: http://192.168.56.101/phpmyadmin&lt;br /&gt;
* Try to log in: &amp;lt;code&amp;gt;ssh student@192.168.56.101&amp;lt;/code&amp;gt;&lt;br /&gt;
* Change the password of user student: &amp;lt;code&amp;gt;passwd&amp;lt;/code&amp;gt;&lt;br /&gt;
* Change the password of MySQL administrator&lt;br /&gt;
* Try to access files via sftp://student@192.168.56.101&lt;br /&gt;
* Make the web server files editable by user student with: &amp;lt;code&amp;gt;sudo chown student -R /var/www/html&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For practice try to set up your homepage in the virtual machine as we did on enos.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
If you didn&#039;t change the password then [https://www.youtube.com/watch?v=PivpCKEiQOQ think again], many virtual machines ship with default passwords that can allow hackers to get in. Be careful when downloading stuff off the internet, virtual machines downloaded from arbitrary websites might have malware bundled with them.&lt;br /&gt;
&lt;br /&gt;
===Sixth session: Keyboard shortcuts===&lt;br /&gt;
&lt;br /&gt;
Unplug the mouse from your computer and deal with it. [[Keyboard shortcuts]] are on a separate page.&lt;/div&gt;</summary>
		<author><name>Sahuts</name></author>
	</entry>
</feed>