I like to help folks with their Electron and React problems, but I often have to repeat the same things over and over again. So here is a short guide to some of the most common questions and issues people have.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hexToHsl($hex) { | |
$hex = array($hex[0].$hex[1], $hex[2].$hex[3], $hex[4].$hex[5]); | |
$rgb = array_map(function($part) { | |
return hexdec($part) / 255; | |
}, $hex); | |
$max = max($rgb); | |
$min = min($rgb); | |
$l = ($max + $min) / 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\ActiveRecord; | |
class PostRepository | |
{ | |
private $cache; | |
public function __construct(Cache $cache) | |
{ | |
// Any set() / get() cache implementation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
laravel new $1 | |
cd $1 | |
composer install | |
yarn install | |
touch README.md | |
cp .env.example .env | |
git init | |
git add -A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://davidpiesse.github.io/tailwind-md-colours/ | |
// | |
//Notes | |
// | |
//All colours are generated from Material Design Docs | |
//Colours have a base, a set of shades (50-900) accent colours | |
//In addition a companion set of contrast colours are included for colouring text / icons | |
// Example usage | |
// class="w-full bg-red-600 text-red-600-constrast" |