Download it here.
I keep forgetting basic stuff on html editing so in order to make my life easier I will start by enumerating useful codes and location of stuff like my template page:
Html uses tags for each entry like a paragraph or a button so I enumerate the tags I will use the most while editing my pages:
ps: one should open the tag with <some tag inside here>
and not forget to close the tag with </same tag inside here>
<p>
element is used to create a paragraph<button>
element is used to create a button like this <a href="replace with the address"> replace with content</a>
like that creates a link like this that directs to another page.<p class="pic"><img src="path/path/image.jpg"></p>
adds an image to the page like the ones bellow<pre class="prettyprint linenums">stuff inside here</pre>
adds a terminal appearance like this:
stuff inside here
To get an idea of what my site would look like I went to the 2016 Fab Academy Student Archives in order to have a look of what others have done and used the random student button.
After review of a few pages I found Yuji OKI's page wich led me to the Fab Academy Template by Massimo Menichinelli
On github I cloned the repository for Massimo's template page to my hard drive. Then copied its contents to a directory with my name.
The code editor I chose to use are Sublime_text3 and Brackets.
Sublime is great for coding, diffing and merging two codes. I specially like to use the plugin "Sublimerge3", It let me compare 2 files and then merge portions of the code.
Most of the time that's where I code HTML. The great feature Brackets have is to update in realtime what you code into the browser page. This way every single modification can be viewed without the need to refresh.
To install it on a MACOS I simply run the following terminal comands:
$ brew cask install sublime-text
$ brew cask install brackets
CSS let you to style you HTML. This can be done in 3 ways: Inline, Internally and externally.
As the current template uses a an external method, and its a huge time saver, that's how I went with. In some places of my website, for lack of better understanding how CSS works I might have used inline styling.
The external style files are bootstrap.css and fabacademy.css. These files are referenced in the <head> section on the beginning of each HTML file.
So far I changed only a few settings in other to achieve the current settings and they are in the fabacademy.css file:
In the bootstrap.css I also did some changes as exemplified bellow:
background-color: #ffffff;
in the html bracket text-align: justify;
font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace;
color: green;
vertical-align: center;
As I had near 0 knowledge on HTML editing or CSS and to better understand HTML Prior to the above modifications I watched Massimo's lecture on HTML and CSS
Also used html references at w3schools.com
Currentely the folder structure is quite simple and well need some cleanup.
/
folder.The exercises or weeks are within html files named after the number of the week they correspond with the EX: week01.html, week01b.html. Because I am having to adapt this website to the current 2018 fabacademy requirements I decided in other to differentiate the files adding a year number in front of the name of the file: Ex. 2018week01.html
/media
this includes files like: STL, PNG, JPG, MP4, ZIP and etc...
/bootstrap
foldercurrent folder structure
In order to save space in the server as well as have a faster loading website we need to constantly make sure we don't miss big uncompressed image and video files
sudo apt install ncdu
ncdu
ncdu will open and with the up and down arrows and enter key you will be able to navigate your directories.
Ncdu will classify the biggest files first and show the more hash tag characters "#" for the biggest folders or files.
In this case the biggest file is a video file for my final project sketch
For the video file we will use ffmpeg
sudo apt install ffmpeg
ffmpeg -i input_video -vcodec libx264 -b:v 1000k -vf scale=-2:720 -an output_video.mp4
The code above should give you a 720p video without audio for more examples check Neil's ffmpeg cheatsheet
I use a package managing software called Chocolatey in order to install some windows software.
It works similarly to apt but for windows.
choco install gimp
First I am using MacOS. With that in mind and with many possible terminal applications to be installed its useful to have Brew it helps with all installations one need to do on Terminal and desktop.
to install open terminal and run:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
next install Cask it helps installing desktop app
$ brew tap caskroom/cask
next install Github desktop that will include Git as well
$ brew cask install github
Now that I have the website set locally its time to upload it to the Fabacademy repository.
To do that I will have to save my public ssh key into the Fabacademy's gitlab website it will let me access it using git without the need to type my password every time. After that its necessary to clone your repo to the local drive to start working on it.
A source of info on how to do it is at the ssh help at gitlab, following is how I did it.
ssh-keygen -t rsa -b 4096 -C "your_email@domain.com"
This will generate the SSH key and the label of the key will be whatever you include inside the quotes
Generating public/private rsa key pair. Enter file in which to save the key (/Users/someone/.ssh/id_rsa):
Enter file in which to save the key (/Users/someone/.ssh/id_rsa): /Users/someone/.ssh/id_rsafab Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/someone/.ssh/id_rsafab. Your public key has been saved in /Users/someone/.ssh/id_rsafab.pub. The key fingerprint is: SHA256:IheXdVbB4DChb7Lyo5nJPHhNyExDKAFw5kADUTMR7MU your_email@domain.com The key's randomart image is: +---[RSA 4096]----+ |XBX= . =.++o. | | =+oE . + * . | | ..o .. + . | | . oo . | | .+ooS o | | o+..+ | | ..o. | | .oo*o | | .Bo.. | +----[SHA256]-----+
$ cat ~/.ssh/id_rsafab.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDRdz+KsRwD2jgojGESZzVQNtFT0uWLGZAieKRNMy4ytav//ABgEB5eAWFTU/YfjQn2apnt+YgXC7aWfjk8Ta5/AQblQ2r/randomfakekeyrandomfakekeyrandomfakekeyrandomfakekeyrandomfakekeyrandomfakekeyrandomfakekeyrandomfakekeyrandomfakekey+rEk6OvIq5F46sKZclXdCLFbj4b9CP5wlFVWm/vq/tgeEbc701587xVCSq/7Ssqv5GNbipbq8eGElKiM4J7h1xlEJmSb06uuqk7PswQjDhV2RFHTl6sNM45qJw30y9O3WkfddFmW5nQ8roP880ef0rvvWK51nvUpmm37rIrHa+rdFpPc9U0bRZ5BhYpp/wMnVHLmZB8W/9Wf2TN0TD/H1AWjvQ1O2EJxKn7GStVGUzopCcIwt+jEjcMZRC/pRZnvEjH30FAFv5F+kYQwmsKcNuZz+qLWF8D5sjVySHSdERLJ3Y7h4ObCJt0ll5+NJ7syf1S7gCotvT910Evorq1f2jb4l6Lt1gJz7uXA03va0HhaBGTKTB0mF7NRJusotyhGWncXgNTkZOkfFQ5Ps1xAcLRmB0uMt0/3MnS7ONu/TfJVuSqYqUuuUtz9hqbke4I4JsD+X7e1a4gAvsFK/nv6Usf0m8aQ== your_email@domain.com
$ eval $(ssh-agent -s) Agent pid 9284 $ ssh-add ~/.ssh/id_rsafab Identity added: /Users/someone/.ssh/id_rsafab (/Users/someone/.ssh/id_rsafab)
git clone git@gitlab.fabcloud.org:academany/fabacademy/2018/labs/yourlab/students/yourname.git
git pull git add --all git commit -m yourmessagehere git push
this series of commands will make sure:
(notes here are to be added along the course as a cheatlist of git commands)
git remote show origin
ssh-copy-id -i ~/.ssh/mykey.pub user@host
git remote add gitlab git@gitlab.fabcloud.org:Lucio/frankenlaser.git git rev-list --reverse master | ruby -ne 'i ||= 0; i += 1; puts $_ if i % 1 == 0' | xargs -I{} git push gitlab +{}:refs/heads/master
I wanted to include instructions on how to create a new repo and upload it to github for future reference even it was not how I did
git init
git add .
git commit -m "First commit"
git remote add origin copied_adress_here
git push -u origin master
and its done
ffmpeg -i videoinput.mp4 -ss 00:00:11 -t 00:00:22 -async 1 videooutput.mp4
ffmpeg -ss 00:00:00 -to 00:00:37 -i videoinput.mp4 -c copy videooutput.mp4
ffmpeg -i input.mp4 -ss 00:00:00.000 -pix_fmt rgb24 -r 10 -s 320x240 -t 00:00:10.000 output.gif
ffmpeg -i input.mp4 -vcodec libx264 -crf 25 -preset medium -vf scale=-2:360 -acodec libmp3lame -q:a 4 -ar 48000 -ac 2 output.mp4
for i in *.mp4; do ffmpeg -i "$i" -vcodec libx264 -crf 25 -preset medium -vf scale=-2:360 -acodec libmp3lame -q:a 4 -ar 48000 -ac 2 "./1/${i%.*}.mp4"; done
ffmpeg -i input.mp4 -vcodec libx264 -crf 25 -preset medium -vf scale=-2:360 -an -q:a 4 -ar 48000 -ac 2 output.mp4
ffmpeg -i input.mp4 -vf "transpose=1" output.mp4