Skip to content

Instantly share code, notes, and snippets.

View whoami15's full-sized avatar
🎯

Daryl Ferrer Legion whoami15

🎯
View GitHub Profile
@danielkellyio
danielkellyio / gist:6dec151d3b6a8cd21270f96ae893b480
Created January 29, 2025 16:52
.cursorrules for nuxt project
You are an expert full-stack Nuxt developer working on a Nuxt 3 project.
## High Level Project Spec
This section gives a high-level overview of the app we're creating in this project.
- It's a test creator that takes in screenshots of pages from a text book and outputs an interactive exam.
- The primary audience of this application is home school teachers who need to create tests for their students
- Users expect a friendly but professional look and feel
@inxilpro
inxilpro / --usage.php
Created February 13, 2024 17:22
Simple wrapper for OpenSpout
<?php
// Reading
CsvReader::read($path)->each(function(array $row) {
// Do something with $row
});
// Writing
return CsvWriter::for($data)->writeToHttpFile();
@hotmeteor
hotmeteor / ApaTitle.php
Created January 3, 2024 22:16
Laravel APA title case macro
<?php
namespace App\Providers\Macros;
class ApaTitle
{
public function __invoke()
{
return function ($string) {
// Define minor words to be lowercase
@cosmeoes
cosmeoes / ebtb-toc.md
Created May 16, 2023 01:18
Eloquent Beyond The Basics Table of Contents
  • The Laravel Query Builder
    • How does it work?
      • Bindings
    • Raw queries
    • Subqueries
      • Aggregates
  • Eloquent
    • What's an ORM?
    • What's the relationship between Eloquent and the query builder?
  • Where is the where?
@grantmcconnaughey
grantmcconnaughey / repeal-section-174.md
Created March 17, 2023 20:04
Letter to Senator to request the repeal of Section 174

Dear Senator [Last name],

As a concerned constituent, I urge you to support the repeal of Section 174 of the Internal Revenue Code, “Amortization of research and experimental expenditures.” This provision significantly increases taxes for small software businesses like mine, threatening our growth, innovation, and competitiveness.

The repeal of Section 174 is crucial for the following reasons:

  • Innovation: Increased taxes hinder small businesses’ ability to invest in research and development, stifling innovation.
  • Job loss: Small software businesses drive job creation. The tax increase may force downsizing, leading to job losses.
  • Fairness: The tax increase disproportionately affects small businesses, putting them at a disadvantage compared to larger corporations who can afford to pay the increased taxes.
<?php
function memoize($target) {
static $memo = new WeakMap;
return new class ($target, $memo) {
function __construct(
protected $target,
protected &$memo,
) {}
<template>
<inertia-head>
<title v-if="title">{{ title }} - My App</title>
<title v-else>My App</title>
<slot />
</inertia-head>
</template>
<script>
export default {
@diego3g
diego3g / metatags.html
Created September 28, 2020 21:57
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} />
@minthemiddle
minthemiddle / Markdium-Hack.php
Created July 9, 2020 20:05
Markdium-Lessons Learnt: Confident Laravel
class PHPUnit extends TestCase
{
public function testAssertions()
{
$this->assertTrue(true);
}
}