Skip to content

Instantly share code, notes, and snippets.

@simtabi
simtabi / StartSSL.md
Created November 3, 2021 17:15 — forked from mgedmin/StartSSL.md
Free StartSSL.com SSL certificate HOWTO

How to get a free StartSSL.com SSL certificate

I'm writing this up from memory, so errors may appear.

This has been updated to use SHA256 certificates.

Start

  1. Go to http://www.startssl.com/
  2. Click on 'Control Panel'
@simtabi
simtabi / vhost-wildcard-subdomain.conf
Created November 13, 2021 13:01 — forked from ofus/vhost-wildcard-subdomain.conf
Apache Virtual Hosts with wildcard subdomain matching
UseCanonicalName Off
<VirtualHost *:80>
ServerAdmin nobody@example.com
ServerAlias *.example.com
VirtualDocumentRoot /var/www/%1/public
DirectoryIndex index.php index.htm index.html
<Directory /var/www/*/public/>
AllowOverride All
</Directory>
@simtabi
simtabi / generate-wildcard-certificate.sh
Created November 18, 2021 20:07 — forked from dmadisetti/generate-wildcard-certificate.sh
Generate self-signed wildcard SSL certificate for development environment
#!/usr/bin/env bash
# print usage
DOMAIN=$1
if [ -z "$1" ]; then
echo "USAGE: $0 tld"
echo ""
echo "This will generate a non-secure self-signed wildcard certificate for "
echo "a given development tld."
echo "This should only be used in a development environment."
@simtabi
simtabi / 2019-https-localhost.md
Created November 18, 2021 20:54 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@simtabi
simtabi / createcertificate
Created November 19, 2021 02:11 — forked from alistairhenderson/createcertificate
Create Wildcard self signed certificate
#!/bin/bash
read -p "Enter the domain name: " domainname
read -p "Enter the domain e.g. local not .local: " domain
read -p "Enter country for csr:" country
read -p "Enter county for csr:" county
read -p "Enter city for csr:" city
read -p "Enter company name for csr:" company
read -p "Enter department for csr e.g IT:" department
read -p "Enter password for certificate greater than 5 characters:" PASS
read -p "Enter howmany years for the certificate to last:" certyears
@simtabi
simtabi / mamp.md
Created November 30, 2021 12:15 — forked from jfloff/mamp.md
How to get MAMP to work with SSL ... Yes really.

First of all you need to be able to run MAMP in port 80. This is a "heat check" if you don't have any process jamming http ports. You can check it like this:

sudo lsof | grep LISTEN

If you do happen to have any process with something like this *:http (LISTEN), you are in trouble. Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand)

ps <pid of that process>

If you don't see MAMP, you are in good hands, I have just the thing for you:

How to add custom Mail Driver to Laravel

Tested on Laravel 5.8

Within the source code of laravel 5.8 at this time of writing, we have this following

<?php

namespace Illuminate\Support;
Artisan
// Displays help for a given command
php artisan --help OR -h
// Do not output any message
php artisan --quiet OR -q
// Display this application version
php artisan --version OR -V
// Do not ask any interactive question
php artisan --no-interaction OR -n
// Force ANSI output
@simtabi
simtabi / dnsmasq_setup_osx.md
Created January 24, 2022 12:00 — forked from eloypnd/dnsmasq_setup_osx.md
wildcard DNS record on OS X in localhost development with dnsmasq

wildcard DNS in localhost development

$ brew install dnsmasq
   ...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
  • edit /usr/local/etc/dnsmasq.conf
address=/local/127.0.0.1
@simtabi
simtabi / brew-dnsmasq.md
Created January 24, 2022 12:01 — forked from davebarnwell/brew-dnsmasq.md
install dnsmasq with brew

Install dnsmasq and configure for *.dev.local domains

$ brew install dnsmasq
$ vim /usr/local/etc/dnsmasq.conf

Reload configuration and clear cache

# Copy the daemon configuration file into place.
$ sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/

$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist