Goals of the week:
What is Git?
Git is a version-control system for tracking changes in computer files and coordinating work on those files among multiple people. Git is a Distributed Version Control System. So Git does not necessarily rely on a central server to store all the versions of a project’s files. Instead, every user “clones” a copy of a repository (a collection of files) and has the full history of the project on their own hard drive. In Git, you can always revert back to the stable state if you face any errors. Git stores this information in a data structure called a repository.
There are four fundamental elements in the Git Workflow
The OpenSSH client, which comes pre-installed on GNU/Linux, macOS, and Windows 10.
SSH version 6.5 or later. Earlier versions used an MD5 signature, which is not secure.
To view the version of SSH installed on your system, run ssh -V.
To install git on macOS, git has to be downloaded to macOS by using third party package manager. For that, I went to the Homebrew to download Homebrew package manager for macOS. To download homebrew, I run installing command in macOS terminal:
{ width: 200px; }
Step 1: Firstly, make sure you have Git installed on your mac. In the terminal and enter the following command:
Step 2: then i put in my details
$ git config --global user.name "YOUR_USERNAME"
$ git config --global user.email "YOUR_EMAILADD"
Create a temp file in fabzero-document to store files which you want to store but dont want to show it on the fabzero-document project in website
Open terminal and type:
mkdir temp
nano .gitignore
temp/
(Text editor opens up. Type the name of the folder you want to store temporary files )
Ctrl + S (save the file)
Ctril + X (to exit)
git status
git add .
git commit -m “adding gitignore”
git push
cd sonam-dorji (to view the folder)
ls
ls -a
(to view the hidden files- the hidden files will be shown here)
Install image magick to the macOS
Commands to optimize images :
Convert bigimage.png - resize 640*640 smallimage.png
mogrify -resize 640*640 bigimage.png
cp bigimage.png bigimage1.png
convert image1.jpg image2.jpg -geometry *400 + append stripimage
We can Extract videos from youtube from the terminals To install
brew install youtube -dl
To extract the video
cd sonampaldondorji/sonam-dorji/temp/ youtube -dl paste the link
To get options for resolution In the terminal
youtube -dl -F paste the link youtube -dl -f 251 paste the link
You need not be an IT expert or even have an IT background to create a website There are many free templates available in the net I used css template to download templates. After selecting the template I edited using visual studio.
To generate SSH keys in macOS, follow these steps:
Enter the following command in the Terminal window.
ssh-keygen -t rsa
This starts the key generation process. When you execute this command, the ssh-keygen utility prompts you to indicate where to store the key.
Press the ENTER key to accept the default location. The ssh-keygen utility prompts you for a passphrase.
Type in a passphrase. You can also hit the ENTER key to accept the default (no passphrase). However, this is not recommended.
You will need to enter the passphrase a second time to continue.
After you confirm the passphrase, the system generates the key pair.
Your private key is saved to the id_rsa file in the .ssh directory and is used to verify the public key you use belongs to the same Triton Compute Service account.
Your public key is saved to the id_rsa.pub;file and is the key you upload to your Triton Compute Service account. You can save this key to the clipboard by running this:
pbcopy < ~/.ssh/id_rsa.pub
After you copy the SSH key to the clipboard, return to your account page.
Choose to Import Public Key and paste your SSH key into the Public Key field.
In the Key Name field, provide a name for the key. Note: although providing a key name is optional, it is a best practice for ease of managing multiple SSH keys.
Add the key. It will now appear in your table of keys under SSH
Go to the terminal and type the following command
git clone paste the SSH link
ls (to list the file)
cd project name
git add .
git commit -m “message”
git push
git status (to check the status)
Bhutan has over 71 percent of its territory under forest cover and is the only carbon negative country in the world. I have always considered myself very fortunate to be part of such a green country and I wanted to contribute towards it, be it big or the smallest way possible. That's how my interest in renewable energy grew. Studying electrical engineering has pushed my interest even more as I have learnt how greatly renewable energy helps conserve our green and beautiful forest. Bhutan already uses hydro, solar, wind and bio-energy to harness electricity. I noticed that the street lights in our country are either operated manually or timer sensors are used whereby the street lights are kept on starting from 7pm in the evening till 6 am in the morning. Street lights are very important and keep the community safe but a lot of energy is wasted when the streets are empty. That’s how I decided I wanted to work on motion sensor street lights as my final project for the fabacademy. Street lights are utilized only when needed. If the street light is powered by solar, then it's like cherry on top.
https://www.freecodecamp.org/news/learn-the-basics-of-git-in-under-10-minutes-da548267cc91/ https://docs.gitlab.com/ee/ssh/ https://www.atlassian.com/git/tutorials/git-ssh