Skip to content

Instantly share code, notes, and snippets.

View Fernando74lr's full-sized avatar
🤘
To be a rock and not to roll

Fernando López Ramírez Fernando74lr

🤘
To be a rock and not to roll
View GitHub Profile

Como subir un proyecto local a github.

desde la web de github

Creamos un nuevo repositorio en https://github.com. Le damos nombre, descripción, seleccionamos si va a ser un proyecto publico o privado si es el caso, y dejamos el check de crear README sin marcar. Le damos a crear repositorio y con esto ya tenemos el repositorio donde alojaremos nuestro proyecto.

desde la terminal del equipo donde esta el proyecto que queremos subir a github

Nos vamos a la carpeta del proyecto y ejecutamos estos comandos.

git init

git add .
@Fernando74lr
Fernando74lr / sweet-alert-msg.js
Last active August 6, 2021 19:23
Simple sweet alert toast for JavaScript
/*
Sweet Alert 2
INSTALLATION:
npm i sweetalert2
ICONS:
- success
- error
- warning
@Fernando74lr
Fernando74lr / bubble_sort.js
Created April 21, 2021 16:49
Simple Bubble Sort algorithm using JavaScript
let nums = [54, 26, 93, 17, 77, 31, 44, 55, 20];
let temp = 0, count = 0;
while(count != nums.length) {
nums.forEach(function(num, i) {
if (num > nums[i + 1]) {
temp = nums[i + 1];
nums[i + 1] = num;
nums[i] = temp;
}
@Fernando74lr
Fernando74lr / Firebase.md
Created March 9, 2021 04:02 — forked from victorbruce/Firebase.md
My journey with Firebase so far. Cheatsheet to serve as a quick reference when developing firebase applications

Firebase

Set up firebase and Deploy

  • Head over to firebase. Sign in and create a project.

  • Copy your project settings under Firebase SDK snippet into your local project (ie your project's api key, auth domain, databaseURL, etc)

  • Create a file (firebase.js or config.js Any name that suits you is fine)

@Fernando74lr
Fernando74lr / current_date_time.js
Created March 8, 2021 21:58
Get current datetime
// Get current date
function getCurrentDate() {
let today = new Date();
let day = String(today.getDate()).padStart(2, '0');
let month = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
let year = today.getFullYear();
return `${day.length == 1 ? '0' + day : day}/${month.length == 1 ? '0' + month : month}/${year}`;
}
// Get current time
// Gretting by the moment of the day
function getDayMoment() {
let hour = new Date().getHours();
if (hour < 12) return ['Good morning', '👋'];
if (hour >= 12 && hour < 18) return ['Good afternoon', '👋'];
if (hour >= 18 && hour < 20) return ['Good evening', '🌗'];
if (hour >= 20) return ['Good night', '🌙'];
}
@Fernando74lr
Fernando74lr / main_sw_structure.asm
Created March 9, 2020 17:59
SWITCH-CASE STRUCTURE IN C-LANGUAGE TO ASSEMBLY
; FERNANDO LÓPEZ RAMÍREZ - A07144620
;****************** HEADER FILES ******************************
list p=18f4550 ; list directive to define processor
#include "p18f4550.inc"
;***************** CONFIGURATION BITS ******************************
; PIC18F4550 Configuration Bit Settings
; ASM source line config statements
@Fernando74lr
Fernando74lr / main_if_structure.asm
Last active March 9, 2020 17:52
IF-STRUCTURE IN C-LANGUAGE TO ASSEMBLY
; FERNANDO LÓPEZ RAMÍREZ - A07144620
;****************** HEADER FILES ******************************
list p=18f4550 ; list directive to define processor
#include "p18f4550.inc"
;***************** CONFIGURATION BITS ******************************
; PIC18F4550 Configuration Bit Settings
; ASM source line config statements
@Fernando74lr
Fernando74lr / main_assigment.asm
Last active March 9, 2020 16:59
ASSIGMENT IN C-LANGUAGE TO ASSEMBLY
FERNANDO LÓPEZ RAMÍREZ - A07144620
;****************** HEADER FILES ******************************
list p=18f4550 ; list directive to define processor
#include "p18f4550.inc"
;***************** CONFIGURATION BITS ******************************
; PIC18F4550 Configuration Bit Settings