Skip to content

Instantly share code, notes, and snippets.

View Michael-Brooks's full-sized avatar
🤓
Geeking out

Michael Brooks Michael-Brooks

🤓
Geeking out
View GitHub Profile
@Michael-Brooks
Michael-Brooks / CasterLabs.md
Last active December 5, 2023 08:27
CasterLabs Variable sheet

!hey

Will display something like "Hey username! Today's stream is stream_title"

Hey ${event.sender.username}! Today's stream is ${Koi.streamStates[event.streamer.platform].title}

@Michael-Brooks
Michael-Brooks / Dockerfile
Created March 17, 2022 16:51
Dockerfile specifically for setting up PHP and Apache with Azure applications
FROM php:7.4-apache
COPY . /var/www/html
WORKDIR /var/www/html
RUN docker-php-ext-install mysqli pdo pdo_mysql
EXPOSE 80 443
@Michael-Brooks
Michael-Brooks / vd
Created November 26, 2019 09:29
Some vagrant commands
cd ~/homestead && vagrant halt

Keybase proof

I hereby claim:

  • I am michael-brooks on github.
  • I am michaelbrooks (https://keybase.io/michaelbrooks) on keybase.
  • I have a public key ASC0pUdFLdzQByyxFmsFFkEoJMOhR76PGFB3bv7Mi_lEIgo

To claim this, I am signing this object:

server {
listen 80;
server_name DEFAULT_SERVER_NAME;
return 301 https://DOMAINNAME$request_uri$is_args$args;
}
server {
listen 80;
server_name *.DOMAINNAME;
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/centos-6.7"
@Michael-Brooks
Michael-Brooks / passwordValidation.php
Last active July 7, 2024 03:44
Laravel Password validation Regex (Contain at least one uppercase/lowercase letters and one number)
<?php
/*
* Place this with the rest of your rules.
* Doesn't need to be in an array as there are no pipes.
* Password is required with a minimum of 6 characters
* Should have at least 1 lowercase AND 1 uppercase AND 1 number
*/
$rules = [
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'
];