Skip to content

Instantly share code, notes, and snippets.

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

mcorridor marlocorridor

🏠
Working from home
View GitHub Profile
@marlocorridor
marlocorridor / install-ssl-apache.md
Created June 12, 2020 06:50 — forked from ccschmitz/install-ssl-apache.md
How to install an SSL certificate on an Apache server.

Installing an SSL certificate on Apache

  1. Create a private key:
openssl genrsa 2048 > private-key.pem
  1. Create a Certificate Signing Request (CSR):
@marlocorridor
marlocorridor / laravel-production-permissions.md
Created June 10, 2020 18:53 — forked from barbietunnie/laravel-production-permissions.md
MySQL Database User GRANT permissions for Laravel

MySQL Database User GRANT permissions for Laravel

For security reasons, you should probably grant select, delete, update and insert to your app user in production.

Have another user who can do alter, create, drop and index when running migrations.

If you run seeders in production, also grant select, insert and references to the migration user.

Yeah, 2 users, migrations are not always run in production everyday and this keeps more secure your database.

@marlocorridor
marlocorridor / key-fingerprint
Created June 10, 2020 03:36 — forked from yosemitebandit/key-fingerprint
view your ssh public key's fingerprint; compare this to what Github has listed in the ssh key audit
$ ssh-keygen -l -f /path/to/keys/id_rsa.pub
2048 aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99 id_rsa.pub (RSA)
@marlocorridor
marlocorridor / gist:c4d8417f2fc58c3fb866e0a6f94354fb
Last active June 19, 2018 04:04 — forked from jordelver/gist:3139365
How to write an image file to an SD card under Mac OS X (for Raspberry Pi)

Find the SD card device

In this case, the SD card is /dev/disk4. DO NOT get this wrong or you may destroy all the data on the wrong disk/card/drive.

diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *160.0 GB   disk0

1: EFI 209.7 MB disk0s1

#!/bin/bash
# Creator: Phil Cook
# Email: phil@phil-cook.com
# Twitter: @p_cook
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g')
brew_array=("5.6","7.0","7.1","7.2")
php_array=("php@5.6" "php@7.0" "php@7.1" "php@7.2")
valet_support_php_version_array=("php@5.6" "php@7.0" "php@7.1" "php@7.2")
php_installed_array=()
@marlocorridor
marlocorridor / cloudflareWhitelistUpdate.php
Last active April 23, 2018 09:33 — forked from ostark/cloudflareWhitelistUpdate.php
Updates the .htaccess with the recent ClouldFlare IPs
<?php
# Exec during deployment
# php cloudflareWhitelistUpdate.php public/.htaccess
$srcUrls = [
'https://www.cloudflare.com/ips-v4',
'https://www.cloudflare.com/ips-v6'
];
$htacessFile = $argv[1] ?? '.htaccess';
@marlocorridor
marlocorridor / callout.scss
Last active November 9, 2016 03:43 — forked from mattsimpson/docs style (bootstrap)
This is the Twitter Bootstrap documentation's callout css. Looks nice.
// Brands
$brand-primary: #3097D1;
$brand-info: #8eb4cb;
$brand-success: #2ab27b;
$brand-warning: #cbb956;
$brand-danger: #bf5329;
.bs-callout {
padding: 20px;
margin: 20px 0;