Compare commits

..

1 Commits

Author SHA1 Message Date
p1r0 ba2363e950 Migrate repository to git DCF 2023-06-07 18:07:03 +00:00
4 changed files with 17 additions and 325 deletions

View File

@ -14,6 +14,9 @@ layout: post
The purpose of the README is to guide on how to contribute to the DCF The purpose of the README is to guide on how to contribute to the DCF
>And not die in the process. >And not die in the process.
> The Offical git repository is at [Decentralized Climate Foundation Git Repository](https://git.decentralizedclimate.org/DecentralizedClimateFoundation/docs)
### System requirements. :card_file_box: ### System requirements. :card_file_box:
* You must have installed [Rubygems version 2.5.0 or higher.](https://rubygems.org/pages/download) (check your Gems version using gem -v since you may already have it installed on your machine). * You must have installed [Rubygems version 2.5.0 or higher.](https://rubygems.org/pages/download) (check your Gems version using gem -v since you may already have it installed on your machine).
@ -41,18 +44,9 @@ Please also verify that you have the latest version of RubyGems by using the com
$ gem -v $ gem -v
$ gem update --system $ gem update --system
# WARNING: If you need to update the gems, there are
# two options: either update them using a tool like rvm# or ruby-install, among others.
# It is not necessary to update them since Ruby is
# already up to date.
# Additionally, you can also update them using the
# following command: */
$ sudo apt update && sudo apt upgrade
# This command first updates the list of available packages and then updates the installed programs on the system to their latest versions.
``` ```
Make sure that you have GCC 10.2.1 and Make 4.3 or higher installed (You can check their installation by using the commands gcc -v, g++ -v, and make -v, respectively). Make sure that you have GCC 10.2.1 and Make 4.3 or higher installed (You can check their installation by using the commands gcc -v, g++ -v, and make -v, respectively).
@ -92,22 +86,10 @@ $ bindle -v
Bundler version 2.4.8 Bundler version 2.4.8
$ bundle exec jekyll b $ bundle exec jekyll serve
# This command is used to gathe
the changes and clear the cache of the browser
being used.
$ bundle exec -H # IP Server & PC # Browse to http://localhost:4000
# Example: bundle exec -H 10.162.235.52
# This command helps us configure the IP of the
# server being used to run bundle. Remember to enter
# the correct IP of your server or PC.
# Remember to run this command in the root folder of
# your Git project. Otherwise, you might get warnings
# that something was compiled incorrectly, even if it's# being run in a subfolder of the project.
``` ```
Remember that the last command is to run the website and verify that the contribution runs correctly. Remember that the last command is to run the website and verify that the contribution runs correctly.

View File

@ -10,14 +10,15 @@ layout: post
| Document | Last Update | | Document | Last Update |
| -------- | -------- | | -------- | -------- |
| [WorkFlow Model EN]({% post_url socialserv/2023-01-27-socialServicesWorkFlowModel %}) | 2023-01 | | [WorkFlow Model]({% post_url socialserv/2023-01-27-socialServicesWorkFlowModel %}) | 2023-01 |
## Lessons & Labs ## Lessons & Labs
| Document | Last Update | | Document | Last Update |
| -------- | -------- | | -------- | -------- |
| [Git & Gitflow ES]({% post_url socialserv/2023-02-22-GitES %}) | 2023-02-22 | | [Git & Gitflow ES](https://hackmd.io/DbzfZuFuSvauJT3-zhO5pg) | 2023-02-22 |
| [Web3 Static ES]({% post_url socialserv/2023-02-24-Web3StaticES %}) | 2023-02-24 | | [Web3 Static ES](https://hackmd.io/gbfcNdtPTNy4jz60-8Fqpw) | 2023-02-24 |
| [UML](https://hackmd.io/GPbCktdZQ-CulhYgddcHPw) | 2023-03 |
> Note: Fix and update links as posts when finished > Note: Fix and update links as posts when finished
@ -28,3 +29,10 @@ layout: post
| [Git & GitFlow ES]({% post_url socialserv/2023-03-15-gitflowCheetSheet_ES %}) | 2023-02-16 | | [Git & GitFlow ES]({% post_url socialserv/2023-03-15-gitflowCheetSheet_ES %}) | 2023-02-16 |
| [Git & GitFlow EN]({% post_url socialserv/2023-03-15-gitflowCheetSheet_EN %}) | 2023-02-16 | | [Git & GitFlow EN]({% post_url socialserv/2023-03-15-gitflowCheetSheet_EN %}) | 2023-02-16 |
## Social Services/ JCF templates
| Document | Last Update |
| -------- | -------- |
| [Bitacora Gustavo](https://hackmd.io/vnhr3g1wT6Wg3wPvSQRdqg) | 2023-01-30|

View File

@ -1,228 +0,0 @@
---
title: Taller de Git & GitFlow
author: Decentralized Climate Foundation
date: 2023-02-22
category: socialservice
layout: post
---
El proposito del siguiente documento es aprender mientras se utiliza git y gitflow, en especial para trabajos colaborativos.
## Proceso
### Los siguientes pasos serian:
1. Crear cuenta en [git DCF](https://git.decentralizedclimate.org/DecentralizedClimateFoundation/docs){:target="_blank"}.
Para crear la cuenta se necesita un correo electrónico y un nombre de usuario, despues presionas en la esquina superior derecha el <**Registro**> e ingresas tu correo de registro, nombre de usuario <**Nombre**> y contraseña **<Contraseña>**.
De esta forma tendras tu propia cuenta dentro de la plataforma git de DCF y clonar los repositorios de la Fundacion para contribuir.
2. Crear un Issue en [git DCF](https://git.decentralizedclimate.org/DecentralizedClimateFoundation/docs){:target="_blank"} con un titulo breve sobre el tema <**Titulo brevemente**> , nombre del estudiante. <**Nombre del Estudiante**> y una descripción <**Descripción**> mas detallada sobre el caso o mejora que se desea realizar.
3. Hacer un Fork del repositorio [docs](https://git.decentralizedclimate.org/DecentralizedClimateFoundation/docs){:target="_blank"} del git de DCF, el cual podemos realizar al clickear el boton en la parte superior derecha donde dice Fork, ahi podemos cambiarle el titulo (Se recomienda mantenerlo y solo aceptar el fork a nuestro repositorio).
4. Se debe tener un acceso a la VPN y solicitar un certiicado, Contacte al [Sysadmin](mailto:david@decentralizedclimate.org) se sugiere el uso de [OpenVPN Connect](https://openvpn.net/client/client-connect-vpn-for-windows/){:target="_blank"}, para el uso del certificado que se envie, tambien se sugiere el uso de [MobaXterm](https://mobaxterm.mobatek.net/){:target="_blank"} si eres usuario de Windous y si eres usuario de Linux o Mac os ya tienes por defecto un cliente ssh.
5. Una ves obtenido su certificado (certificado.ovpn) importarlo en la OpenVPN y encenderla.
6. En su MobaXterm o terminal preferida se siguen los siguientes comandos:
```shell
$ ssh <nombreUsuario>@10.162.235.52 #Nos conectamos ala maquina con IP "10.162.235.52" con el usuario que se nos fue asignado y ingresar la password que le fue dada.
$ su [team numero] #Aqui se usara el team al que seas unido ejemplo si eres del team 2 de**
```
>**Si estas dentro de tmux para salir utiliza Ctrl+b despues apretar d para no cerrar la sesion de todo.**
7. Una ves en su team clonar el siguiente repositorio:
```shell
$ git clone https://git.decentralizedclimate.org/DecentralizedClimateFoundation/docs
```
8. Entramos al proyecto clonado previamente en la maquina y ingresamos en la siguiente ruta: docs/
```shell
$ cd docs/
```
9. Inicializamos git flow con el siguiente comando, y dejamos todo por dafault:
```shell
$ git flow init
Which branch should be used for bringing forth production releases?
- master
Branch name for production releases: [master]
Branch name for "next release" development: [develop]
How to name your supporting branch prefixes?
Feature branches? [feature/]
Bugfix branches? [bugfix/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/]
Version tag prefix? []
Hooks and filters directory? [/home/team2/docs/docs2/.git/hooks]
```
10. Checamos la rama en la que estamos que tiene que ser 'develop':
```shell
$ git checkout
Your branch is up to date with 'origin/develop'.
```
11. Sigue el [Readme](https://git.decentralizedclimate.org/DecentralizedClimateFoundation/docs){:target='_blank'} para instalar y visualizar jekyll mientras continuas el taller.
12. Abrimos el Feature con el siguiente comando:
```sh
$ git flow feature start <MyFeature> #MyFeature se cambia por el nombre que quieras identificarlo
```
13. Entramos ala ruta siguiente dentro de 'docs/':
```shell
$ cd _posts/socialserv/
```
14. Buscaremos el archivo que editaremos en este caso '2023-02-22-GitES.md' para eso hacemos primero un 'ls' para listar los archivos en la carpeta que estamos y despues usamos vim para editarlo.
```shell
$ ls
2023-01-27-socialServicesWorkFlowModel.md
2023-02-24-Web3StaticES.md
2023-03-15-gitflowCheetSheet_ES.md
2023-02-22-GitES.md
2023-03-15-gitflowCheetSheet_EN.md
$ vim 2023-02-22-GitES.md
```
>Se adjunta un Cheat Sheet de vim para guiarte y editar de forma correcta y eficiente el archivo en vim.
```shell
# Cheat Sheet de Comandos Básicos de Vim
Modo Normal:
- `i` - Cambiar al modo de inserción.
- `x` - Eliminar el carácter actual.
- `dd` - Eliminar la línea actual.
- `yy` - Copiar la línea actual.
- `p` - Pegar el contenido copiado o eliminado después de la línea actual.
- `u` - Deshacer la última acción.
- `Ctrl + r` - Rehacer la última acción deshecha.
- `:w` - Guardar el archivo.
- `:q` - Salir de Vim.
- `:q!` - Salir de Vim sin guardar cambios.
Modo de Inserción:
- `Esc` - Cambiar al modo normal.
Modo de Comando:
- `:set number` - Mostrar números de línea.
- `:set nonumber` - Ocultar números de línea.
- `:set tabstop=4` - Establecer el tamaño de la pestaña en 4 espacios.
- `:set expandtab` - Utilizar espacios en lugar de tabulaciones.
- `:set autoindent` - Habilitar la indentación automática.
- `:set syntax=python` - Establecer la sintaxis resaltada para Python (sustituir "python" por el lenguaje correspondiente).
- `:help <comando>` - Mostrar la ayuda sobre el comando especificado.
```
Puedes agregar, editar o mejorar el documento asi como estudiar el cheetsheet de gitflow y de gitlab.
15. Una ves echo los cambios en el documento y guardarlos, salimos de vim escribiendo ':wq' en modo normal (presionando "esc") , hay que registrarlos en git con el siguiente comando:
```shell
$ git add . # El punto significa que queremos agregar los cambios a todos los archivos
```
> Antes de agregar algo, recuerda estar en la raiz del proyecto git en este caso **docs**
Con esto agregamos el archivo o archivos modificados al area de preparacion.
Despues debemos crear el commit con los cambios agregados.
16. Después de ejecuta ,`git add` puedes crear un commit utilizando el comando `git commit -m <Mensaje del commit>`. Al hacerlo, se crea un nuevo commit que contiene los cambios registrados en el área de preparación. El mensaje del cmit proporcionado después del parámetro -m describe los cambios realizados en ecommit :
```shell
$ git commit -m 'Mensaje'
```
> Aclara que se modifico, agrego o mejoro en el commit brevemente pero conciso.
17. Una vez echo el commit se finaliza el desarrollo del feature:
```shell
$ git flow finish <myFeature>
$ git checkout
Your branch is up to date with 'origin/develop'.
```
> Se utliza `git checkout` para verificar que estamos en la rama develop
18. Al terminar el Feature debemos hacer el push con referencia.
```shell
$ git pull
$ git push
```
> Por buena practica se recomienda hacer primero un pull y despues nuestro respectivo push.
Esto nos pedira nuestro usuario y un codigo ssh que nos proporciona el mismo git.
> El ssh lo puedes generar al entrar a [Configuracion ~ Aplicaciones] le ingresamos un nombre y generamos el codigo que sustituira a la contraseña.
Verifica que si se hizo el git push en tu repositorio forkeado en la pagina de git debes ingresar a tu repositorio y ver que el push fue agregado de forma correcta.
19. Puedes comprobar que tu commit esta ya en la rama develop cuando hagas uso del comando:
```shell
$ git log
```
> El cual nos da un historial de los commits del proyecto con los datos de quien lo hizo a que hora y la fecha.
20. Hacer el Pull Request en el git de Decentralized Climate de la rama develop personal a la rama develop del Repositorio de DCF.
21. ***Exito*** concluiste tu Taller de Git y GitFlow. :)
## CONTACTO Y DESARROLLADORES
> Work developed in collaboration with the [Decentralized Climate Foundation](https://decentralizedclimate.org){:target="_blank"}.
- [David E. Perez Negron R.](mailto:david@neetsec.com) @p1r0
- [Gustavo Bermudez](mailto:nizaries44@gmail.com)
- [Sebastian Zarraga](https://github.com/SebastianZR)
## Referencias
1. Cheatsheet de git flow: [https://danielkummer.github.io/git-flow-cheatsheet/](https://danielkummer.github.io/git-flow-cheatsheet){:target="_blank"}, 2023-07-17.
2. Video Sobre gitflow: [https://www.youtube.com/watch?v=BYrt6luynCI](https://www.youtube.com/watch?v=BYrt6luynCI){:target="_blank"}, 2023-07-17.
3. Link Hackmd a Git: [https://hackmd.io/c/tutorials/%2Fs%2Flink-with-github](https://hackmd.io/c/tutorials/%2Fs%2Flink-with-github){:target="_blank"}, 2023-07-17.
4. Adam P., "Mardown Cheatsheet", [https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet]( https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet){:target="_blank"}, 2023-07-17.
5. Cheatsheet de vim: [https://devhints.io/vim](https://devhints.io/vim){:target="_blank"}, 2023-07-17.
6. Cheatsheet [Git & GitFlow ES]({% post_url socialserv/2023-03-15-gitflowCheetSheet_ES %}){:target="_blank"}, 2023-07-17.

View File

@ -1,70 +0,0 @@
---
title: Taller de WEB3 static
author: Decentralized Climate Foundation
date: 2023-02-24
category: socialservice
layout: post
---
El proposito del siguiente taller es descentralizar una pagina estatica con varias herramientas y servicios gratuitos.
* Se debe documentar el proceso en un reporte markdown (cheetsheet).
* Si la fundacion tiene el manual y/o cheetsheet referente al titulo se debe contribuir a su al de la fundacion, si no agregar la documentacion en el repositorio docs.
* Agrega issues al repositorio official si encontraste o propones mejoras.
## Requerimientos
* Tener completado el taller de Git y GitFlow.
* Conceptos Basicos sobre IPFS.
* Acceso a cuenta fleek.co o crear una.
## Proceso
El estudiante deberá copiar la lista de cada subtema a una tarjeta en [nextcloud de servicios sociales](https://nextcloud.neetsec.com/index.php/apps/deck/#/board/10) en la descripcion como markdown, Se tiene que realizar las tareas del checklist y el encargado del estudiante de servicio social verificara y marcará como terminado cada tarea cuando el estudiante haga solicitud de revision.
### Jekyll
* Hacer un pomodoro para investigar que es y como funcionan Jamstack y Jekyll.
* Hacer un fork del [projecto docs](https://github.com/DECENTRALIZEDCLIMATE/docs) y clonar en tu maquina.
* Crear un feature en tu repo clonado en tu maquina.
* Iniciar un projecto jekyll siguiendo [el tutorial](https://jekyllrb.com/docs/) [2] y si tienes linux, antes de seguir el tutorial, debe [configurarlo en linux](https://jekyllrb.com/docs/installation/ubuntu/) [6]
> Nota: si tienes zsh, en linux, cambiar ~/.bashrc por ~/.zshrc en los comandos de configuracion [6]
* Instalar a tu feature el tema [gitdocs](https://github.com/sighingnow/jekyll-gitbook#how-to-get-started) [3]
* Mover los documentos previos [projecto docs](https://github.com/DECENTRALIZEDCLIMATE/docs) a la la carpeta en posts y convertir en el formato jekyll posts con la sección que le corresponde.
* Crear un archivo [.gitignore](https://git-scm.com/docs/gitignore) con los archivos inecesarios y estaticos generados por jekyll.
* Hacer un README.md EN INGLES sobre los pasos y requerimientos para llegar a este punto a partir de que se inicio el projecto git. [Ejemplo1](https://gitlab.com/deca-currency/decasearch) , [Ejemplo2](https://gitlab.com/deca-currency/price-mechanism).
* Finalizar el feature
* Hacer un pull request a la rama develop del [projecto docs](https://github.com/DECENTRALIZEDCLIMATE/docs)
### FLEEK e IPFS
### Deployment
## CONTACTO Y DESARROLLADORES
> Work developed in collaboration with the [Decentralized Climate Foundation](https://decentralizedclimate.org).
- [David E. Perez Negron R.](mailto:david@neetsec.com)
## Referencias
\[1\] Gustavo Bermudez, "Git-flow cheatsheet", https://hackmd.io/@SocialServicesDCF/r1-M3Lnpj, 2023.
\[2\] jekyllrb.com, "Quickstart", https://jekyllrb.com/docs/, 2023.
\[3\] sighingnow, "jekyll-gitbook", https://github.com/sighingnow/jekyll-gitbook#how-to-get-started, 2023.
\[4\] Bleecker, "Interplanetary File System.", https://hackmd.io/0nyNLX4eRX-t1NvqoyIdMQ?view, 2023.
\[5\] git-scm.com, "Documentation Reference - gitignore", https://git-scm.com/docs/gitignore, 2023.
\[6\] jekyllrb.com, "Jekyll on Ubuntu", https://jekyllrb.com/docs/installation/ubuntu/, 2023.