Skip to content

Instantly share code, notes, and snippets.

View joseederangojr's full-sized avatar
🎯
Focusing

Jose Ederango Jr joseederangojr

🎯
Focusing
View GitHub Profile
@joseederangojr
joseederangojr / laravel.sh
Last active February 10, 2024 19:54
Install LEMP, Redis, Certbot, and Supervisor
#!/usr/bin/env bash
set -e
: ${PHP_VERSION:="8.2"}
: ${NODE_VERSION:="20"}
: ${APP_REPO:="https://github.com/laravel/laravel.git"}
: ${MYSQL_ROOT_PASSWORD:=$(openssl rand -base64 32)}
: ${MYSQL_ICSP_USER:="icspdbadmin"}
: ${MYSQL_ICSP_DATABASE:="icspdb"}
: ${MYSQL_ICSP_PASSWORD:=$(openssl rand -base64 32)}
@joseederangojr
joseederangojr / install.sh
Last active November 24, 2023 10:08
bash script to automate fresh installation for laravel (nginx,php,composer,redis,mysql,supervisor,certbot, nodejs)
#!/bin/bash
# Original script https://raw.githubusercontent.com/vitodeploy/vito/main/install/install.sh
export DEBIAN_FRONTEND=noninteractive
export NEEDRESTART_MODE=a
echo "Enter username"
read USERNAME
echo "Enter domain"
@joseederangojr
joseederangojr / wizards.js
Last active October 27, 2020 06:50
A simple programming contest for our college
/**
* @description REQUIRED!!
* Create a function to tests if given
* parameters are equal
* @note
* this function with be used to test your outputs :D
* if you fail to create this function
* you're score will be 0 automatically
*/
const assertEqual = (output, expected) => output === expected
@joseederangojr
joseederangojr / Anchor.jsx
Last active June 7, 2020 21:53
Scrolling to anchor tags using React Hooks (React Router, also working without router library)
import React from "react"
import {Link} from "react-router-dom"
import { useScrollToView } from "./useScrollToView"
export default function Anchor() {
useScrollToView()
return (
<div>
<nav>
<Link to="#about">About using React Router</Link>
<a href="#about">About using html anchor tag</a>