Skip to content

Instantly share code, notes, and snippets.

View whoami15's full-sized avatar

Daryl Ferrer Legion whoami15

View GitHub Profile
@whoami15
whoami15 / metatags.html
Created May 20, 2021 17:13 — forked from diego3g/metatags.html
Meta tags do curso de Next.js
<meta httpEquiv="x-ua-compatible" content="IE=edge,chrome=1" />
<meta name="MobileOptimized" content="320" />
<meta name="HandheldFriendly" content="True" />
<meta name="theme-color" content="#121214" />
<meta name="msapplication-TileColor" content="#121214" />
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="google" content="notranslate" />
<meta property="og:title" content={pageTitle} />
<meta property="og:description" content={description} />
<template>
<inertia-head>
<title v-if="title">{{ title }} - My App</title>
<title v-else>My App</title>
<slot />
</inertia-head>
</template>
<script>
export default {
@whoami15
whoami15 / .php-cs-fixer.php
Created December 17, 2021 05:19 — forked from laravel-shift/.php-cs-fixer.php
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',

Learning Plan for Design Patterns and Principles of Good Design

These learning resources primarily focus on programming using Good Design Principles and Design Patterns

  • There is an emphasis on learning using PHP, although most patterns are universal to every object orientated language.
@whoami15
whoami15 / Test Driven Laravel.md
Last active November 20, 2022 11:51 — forked from Pen-y-Fan/Test Driven Laravel.md
Test Driven Laravel
@whoami15
whoami15 / Info for PHPStorm.md
Created November 20, 2022 11:51 — forked from Pen-y-Fan/Info for PHPStorm.md
PHPStorm Tips, Tricks and setup

PHPStorm

PhpStorm Tips, ticks and standard setup

  1. Tips and Tracks for PHPStorm (PHPStorm Tips and Tricks.md)
  2. Standard setup for PHP projects (Standard.md)

Learning Plan for Test Driven Development (TDD)

These learning resources primarily focus on Test Driven Development (TDD).

  • There is an emphasis on learning using PHP, Laravel and PHPUnit.
  • All these resources are free (at the time of writing)
<?php
function memoize($target) {
static $memo = new WeakMap;
return new class ($target, $memo) {
function __construct(
protected $target,
protected &$memo,
) {}
<?php
/**
* Refactor #1:
*/
// Before
if ($user->type === 'admin' || $user->type === 'mod' || $user->type === 'author') {
// Do something.
}
@whoami15
whoami15 / --usage.php
Created February 14, 2024 00:39 — forked from inxilpro/--usage.php
Simple wrapper for OpenSpout
<?php
// Reading
CsvReader::read($path)->each(function(array $row) {
// Do something with $row
});
// Writing
return CsvWriter::for($data)->writeToHttpFile();