Skip to content

Instantly share code, notes, and snippets.

View EduVillas's full-sized avatar
🎯
Focusing

Eduardo Villas Boas EduVillas

🎯
Focusing
View GitHub Profile
@karlhillx
karlhillx / macos_big_sur_homebrew_apache_php_mariadb_2020.md
Last active October 20, 2024 02:33
macOS Big Sur 11.0 Setup: Homebrew + Apache + PHP + MariaDB (Regularly updated)

macOS Big Sur 11.0 Setup: Homebrew + Apache + PHP + MariaDB

This document helps get your macOS development environment up and running with the latest versions of Homebrew, Apache, PHP, and MariaDB.

@EduVillas
EduVillas / ApacheHTTPSConfig.md
Created April 29, 2018 01:10 — forked from nrollr/ApacheHTTPSConfig.md
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

@jonatanrdsantos
jonatanrdsantos / diasUteis.php
Created October 30, 2017 19:32
Calculo de dias úteis em php
<?php
function getWorkingDays($startDate, $endDate) {
$begin = strtotime($startDate);
$end = strtotime($endDate);
if ($begin > $end) {
return 0;
}
else {
$holidays = array('01/01', '03/04', '21/04', '01/05', '07/09', '12/10', '02/11', '15/11', '25/12');
$weekends = 0;