User:AvitalB/prototyping: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="width: 100%; background-color: white; text-align: center; padding-top: 10px; padding-bottom: 10px;">  
<div style="width: 100%; background-color: white; text-align: left; padding-top: 10px; padding-bottom: 10px;">  
<span style="display: inline; position: relative; font: 80px Futura, Sans-Serif; font-weight: normal; letter-spacing: 40px; color: rgba(0,0,0,0.7); text-shadow:20px 0px rgba(0,0,0,0.6); cursor:progress;">Prototyping</span>  
<span style="display: inline; position: relative; font: 85px monospace, Sans-Serif; font-weight: normal; letter-spacing: 20px; color: rgba(96,96,96,0.8); cursor:progress;">Prototyping X</span>  
</div>
</div>
<br>
 
<br>
 
=Session 1=
=Session 1=
<h3>Unix</h3>
===Unix===
[https://www.techopedia.com/definition/4637/unix Unix] is a portable, multitasking, multiuser, time-sharing operating system (OS) originally developed in 1969 by a group of employees at AT&T.
[https://www.techopedia.com/definition/4637/unix Unix] is a portable, multitasking, multiuser, time-sharing operating system (OS) originally developed in 1969 by a group of employees at AT&T.
<h3>Raspberry Pi</h3>
===Raspberry Pi===
[https://opensource.com/resources/raspberry-pi Raspberry Pi] is the name of a series of single-board computers made by the Raspberry Pi Foundation, a UK charity that aims to educate people in computing and create easier access to computing education.
[https://opensource.com/resources/raspberry-pi Raspberry Pi] is the name of a series of single-board computers made by the Raspberry Pi Foundation, a UK charity that aims to educate people in computing and create easier access to computing education.
<br>
 
<br>
 
=Session 2=
=Session 2=
Session 2 [https://pad.xpub.nl/p/prototyping-20190930 pad]
Session 2 [https://pad.xpub.nl/p/prototyping-20190930 pad]
<h3>Creating a key</h3>
===Creating a key===
- Key for our user in pi (created in the first session)
* Key for our user in pi (created in the first session)
<br>
* Our ssh key
- Our ssh key


Output in terminal when creating a key
Output in terminal when creating a key
Line 35: Line 34:
Making a secure login for the pi with our key
Making a secure login for the pi with our key


<b>ls -a</b> gives hidden files
'''ls -a''' gives hidden files


Question: How do we create hidden files?
Question: How do we create hidden files?
<h3>Git</h3>
 
===Git===
The software that runs git softwares or companies based on git (GitHub,gitlab or git.xpub.nl)
The software that runs git softwares or companies based on git (GitHub,gitlab or git.xpub.nl)
<br>
 
It’s a way to keep track versions of projects (text, code, websites, images)
It’s a way to keep track versions of projects (text, code, websites, images)


A git project will have a parent folder.
A git project will have a parent folder.
<br>
 
Parent folder- might have other folders in it with other files
Parent folder- might have other folders in it with other files


Line 58: Line 58:


HEAD- like a brunch, the version I am in right now
HEAD- like a brunch, the version I am in right now
<br>
 
MASTER- like in Abstract
MASTER- like in Abstract


'''git diff <file name>-''' shows the what have change since previous commit
'''git diff <file name>-''' shows the what have change since previous commit
<br>
 
'''git checkout -- <file name>-''' deletes the changes that where made and comes back to the last commit
'''git checkout -- <file name>-''' deletes the changes that where made and comes back to the last commit
<br>
 
'''git add -u -''' will add all the tracked ones
'''git add -u -''' will add all the tracked ones
<br>
 
'''git reset HEAD <name of file> -''' Undo a commit
'''git reset HEAD <name of file> -''' Undo a commit
<br>
 
'''git log-''' shows the commits
'''git log-''' shows the commits


<h3>Publishing on XPUB GIT</h3>
===Publishing on XPUB GIT===
Create a new repository
*Create a new repository
<br>
*When you create it gives instructions (choose SSH in the toggle)
When you create it gives instructions (choose SSH in the toggle)
*pushing= publish to git website
<br>
 
pushing= publish to git website
===Pushing from git to raspberry pi===
* For now raspberry pi will just host our website
* On the git website we see the published file in dashboard
 
''*** sudo let’s you install thing on pi- sudo apt install <software name> ***''


<h3>Pushing from git to raspberry pi </h3>
- For now raspberry pi will just host our website
<br>
- On the git website we see the published file in dashboard
<br>
''*** sudo let’s you install thing on pi- sudo apt install <software name> ***
<br>''
''*** sudo su- you can be someone else ***''
''*** sudo su- you can be someone else ***''
<br>
use HTTPS link (top right)
<br>
Command to clone to pi:
<br>
'''git clone <HTTPS link> name the new folder'''


<h3>Work flow</h3>
*use HTTPS link (top right)
Clone to your computer the folder from GIT (with the ssh url)
*Command to clone to pi '''git clone <HTTPS link> name the new folder'''
<br>
Then you can pull changes from the GIT
<br>
Or push changes back to the GIT


===Work flow===
* Clone to your computer the folder from GIT (with the ssh url)
* Then you can pull changes from the GIT
* Or push changes back to the GIT
[[File:Galaxy.jpeg]]
[[File:Galaxy.jpeg]]
===More GIT===
You can always revert to a previous commit on git with git log> than you copy the “name” (very long digits and numbers) of the commit. Than you do git checkout <insert name of commit you copied before>
'''git checkout HEAD'''> takes you back to the latest commit
'''git checkout MASTER'''> takes you to the master
'''git status'''>shows you what is happening right now in the repository
'''.DS_store''' files that Mac makes (we want bot to see them)
'''cd..''' go back to parent directory
'''ls -al''' > shows you regular+invisible files
'''Nano''' basic text editor (a bit like ne)
'''Nano .gitignore''' git will ignore this type of files
Example:
* .DS_store
* tmp/*- will ignore everything in this folder
* *.jpeg- will ignore all jpeg files
'''git commit -m “gitignore file” .gitignore'''
'''-m''' is a message specific for one file
'''-a''' will commit a bundle of all files added
'''Commit''' is local
'''Push''' makes it public

Latest revision as of 14:22, 22 May 2020

Prototyping X


Session 1

Unix

Unix is a portable, multitasking, multiuser, time-sharing operating system (OS) originally developed in 1969 by a group of employees at AT&T.

Raspberry Pi

Raspberry Pi is the name of a series of single-board computers made by the Raspberry Pi Foundation, a UK charity that aims to educate people in computing and create easier access to computing education.


Session 2

Session 2 pad

Creating a key

  • Key for our user in pi (created in the first session)
  • Our ssh key

Output in terminal when creating a key

+---[RSA 2048]----+         
|BEo       .      |
|**o      +       |
|=o+     . +      |
|.=o..  . +       |
|.ooo.o  S        |
|.oooo+.B +       |
|. o ..B.B        |
|      .= .       |
|     .ooB+       |
+----[SHA256]-----+

Making a secure login for the pi with our key

ls -a gives hidden files

Question: How do we create hidden files?

Git

The software that runs git softwares or companies based on git (GitHub,gitlab or git.xpub.nl)

It’s a way to keep track versions of projects (text, code, websites, images)

A git project will have a parent folder.

Parent folder- might have other folders in it with other files

git init- stating the git program in your folder (makes a git. Folder)

Command to make git track your project:
git status- shows in red what isn’t tracked and in green what is tracked
git add <file name>- starts tracking that file or files
git commit -m <“a comment about what change has been made”>- saves the version in the .git folder

HEAD- like a brunch, the version I am in right now

MASTER- like in Abstract

git diff <file name>- shows the what have change since previous commit

git checkout -- <file name>- deletes the changes that where made and comes back to the last commit

git add -u - will add all the tracked ones

git reset HEAD <name of file> - Undo a commit

git log- shows the commits

Publishing on XPUB GIT

  • Create a new repository
  • When you create it gives instructions (choose SSH in the toggle)
  • pushing= publish to git website

Pushing from git to raspberry pi

  • For now raspberry pi will just host our website
  • On the git website we see the published file in dashboard

*** sudo let’s you install thing on pi- sudo apt install <software name> ***

*** sudo su- you can be someone else ***

  • use HTTPS link (top right)
  • Command to clone to pi git clone <HTTPS link> name the new folder

Work flow

  • Clone to your computer the folder from GIT (with the ssh url)
  • Then you can pull changes from the GIT
  • Or push changes back to the GIT

Galaxy.jpeg

More GIT

You can always revert to a previous commit on git with git log> than you copy the “name” (very long digits and numbers) of the commit. Than you do git checkout <insert name of commit you copied before>

git checkout HEAD> takes you back to the latest commit git checkout MASTER> takes you to the master

git status>shows you what is happening right now in the repository

.DS_store files that Mac makes (we want bot to see them)

cd.. go back to parent directory

ls -al > shows you regular+invisible files

Nano basic text editor (a bit like ne)

Nano .gitignore git will ignore this type of files

Example:

  • .DS_store
  • tmp/*- will ignore everything in this folder
  • *.jpeg- will ignore all jpeg files

git commit -m “gitignore file” .gitignore

-m is a message specific for one file

-a will commit a bundle of all files added

Commit is local

Push makes it public