Skip to content

Instantly share code, notes, and snippets.

View hectorlopezv's full-sized avatar
🏠
Working from home

hector vinicio lopez hectorlopezv

🏠
Working from home
View GitHub Profile
@hectorlopezv
hectorlopezv / caddy_ec2_ubuntu22_04.sh
Created June 20, 2024 23:09 — forked from abhishek77in/caddy_ec2_ubuntu22_04.sh
Script to install caddy on ubuntu 22.04 aws ec2
#!/bin/bash
sudo apt update
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
caddy version
sudo systemctl status caddy
sudo systemctl enable caddy
@hectorlopezv
hectorlopezv / multiple_ssh_setting.md
Created August 16, 2023 17:56 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
def kangaroo(x1, v1, x2, v2):
s_f = x1+v2-v1-x2#formula a_start+(n_meet-1)*diff compare both
i_f = v2-v1
if i_f == 0:
return "NO"
n_saltos = s_f/i_f
n_saltos = n_saltos - 1
print(n_saltos)
if n_saltos <= 0 or n_saltos/1 - n_saltos//1 >0:
def gradingStudents(grades):
# Write your code here
retrun_list = []
for el in grades:
div_ = el //5
mul_ = div_ * 5
sum_ = mul_ + 5
if sum_ - el < 3 and sum_ >=38:
print("es mayor que sum",sum_)
retrun_list.append(sum_)
def getMoneySpent(keyboards, drives, b):
#
# Write your code here.
#
print(keyboards)
print(drives)
comb = temp = 0
pos_com = False
for k in keyboards:
pass
int hourglassSum(int arr_rows, int arr_columns, int** arr) {
int i, j;
int a,b,c;
int d;
int e,f,g;
int sum = -64, temp = 0;
for(i = 0; i < 4; i++)
{
int birthdayCakeCandles(int ar_count, int* ar) {
int stack_ = 0;
int len_ = 1;
stack_ = ar[0];
//print(stack_)
for (int i =1; i< ar_count; i++)
{
if (ar[i] == stack_)
len_ = len_ + 1;
if (ar[i] > stack_)