User:AvitalB/prototyping: Difference between revisions
(Created page with "hello") |
No edit summary |
||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<div style="width: 100%; background-color: white; text-align: left; padding-top: 10px; padding-bottom: 10px;"> | |||
<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> | |||
=Session 1= | |||
===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. | |||
===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. | |||
=Session 2= | |||
Session 2 [https://pad.xpub.nl/p/prototyping-20190930 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 | |||
<pre> | |||
+---[RSA 2048]----+ | |||
|BEo . | | |||
|**o + | | |||
|=o+ . + | | |||
|.=o.. . + | | |||
|.ooo.o S | | |||
|.oooo+.B + | | |||
|. o ..B.B | | |||
| .= . | | |||
| .ooB+ | | |||
+----[SHA256]-----+ | |||
</pre> | |||
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:''' | |||
<br> | |||
'''git status-''' shows in red what isn’t tracked and in green what is tracked | |||
<br> | |||
'''git add <file name>-''' starts tracking that file or files | |||
<br> | |||
'''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 | |||
[[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
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