Skip to content

Instantly share code, notes, and snippets.

@trevorgreenleaf
trevorgreenleaf / gist:330ee5ee066e0445f35a9305f1c05d44
Created December 21, 2019 01:45
Laravel Valet - MYSQL Password not working after fresh install
Im using MacOS Catalina. and beta version of Sequel Pro
//
Was getting error MySQL said: Authentication plugin 'caching_sha2_password
to fix this I reset the password on mysql and it seemed to do the trick
mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '[PASSWORD]'; where [PASSWORD] is a password of your choosing.
@trevorgreenleaf
trevorgreenleaf / gist:320eb0f0cdd585dcf6c5654d875163f4
Created April 15, 2019 18:24
Laravel Valet MySQL Connection Issue on Fresh install - caching_sha2_password
Issue with Mysql now makign passwords sha2 you need to fix by running these to commands
https://laracasts.com/discuss/channels/laravel/caching-sha2-password-error-when-running-php-artisan-migrate
mysql -uroot -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
@trevorgreenleaf
trevorgreenleaf / gist:2f4092b721471307e7bb9c680559c04b
Created March 10, 2019 20:44
Laravel Valet Uninstall and then Reinstall everytime I switch user accounts
## Uninstall process
#remove valet
rm -rf ~/.valet
rm ~/usr/local/bin/valet
# change the permisions on all brew files
sudo chown -R $(whoami) $(brew --prefix)/*
# now uninstall all brew packages
@trevorgreenleaf
trevorgreenleaf / tweets.redactor.js
Created January 9, 2019 23:36 — forked from chekalsky/tweets.redactor.js
Imperavi Redactor Plugin for Embedding Tweets Usage: mention "tweets" in "plugins" setting of you redactor.
/**
* Imperavi Redactor Plugin for Embedding Tweets
* for version >= 9.1
*
* @author Ilya Chekalskiy <ilya@chekalskiy.ru>
* @version 0.2.2
*/
if (typeof RedactorPlugins === 'undefined') var RedactorPlugins = {};
RedactorPlugins.tweets = {
<?php
// pass a url
function getStuff($url){
// go get the content from that url
// then convert the content to a php object
return json_decode(file_get_contents($url));
}
// get the person data
int led1 = D0;
// the little blue LED on your board
int led2 = D7;
// when the device starts up it will run the setup function or when the device is reset
// void meaning it is not going to return a value
void setup() {
// We are going to tell our device that D0 and D7 (which we named led1 and led2 respectively) are going to be output
@trevorgreenleaf
trevorgreenleaf / gist:693368e0b6dc70aa22d15e2498c3625f
Created July 24, 2018 14:21
Particle Photon Workshop | On off via a web browser
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>IOT Workshop | Particle.io LED Light turn On</title>
<!-- <link href="https://cdn.jsdelivr.net/npm/tailwindcss/dist/tailwind.min.css" rel="stylesheet"> -->
</head>
<body>
<div id="app">
# redirect to new domain
rewrite ^/(.*) https://some-domain.com/$1 permanent;
@trevorgreenleaf
trevorgreenleaf / reset.css
Last active May 21, 2018 21:12
CSS Normalize
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
@trevorgreenleaf
trevorgreenleaf / imagick3.4.3-PHP7.1-forge.sh
Created April 11, 2018 16:34 — forked from jacobmllr95/imagick3.4.3-PHP7.1-forge.sh
Install Imagick 3.4.3 on PHP 7.1 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.3.tgz
tar xvzf imagick-3.4.3.tgz