Skip to content

Instantly share code, notes, and snippets.

View magarrent's full-sized avatar
🎯
Focusing

Marc Garcia Torrent magarrent

🎯
Focusing
View GitHub Profile
@tommy-ec
tommy-ec / stripe-live-to-test-env.php
Created February 6, 2024 15:16
PHP script to replicate Stripe's live environment products, plans, and prices to the test environment.
/*
* This script copies products, plans, and prices from Stripe's live environment to the test environment.
* It requires the Stripe PHP library (https://github.com/stripe/stripe-php).
*
* To use this script, replace $stripeLiveSecretKey and $stripeTestSecretKey with your own Stripe keys.
*
* Note: The script handles exceptions and avoids duplication by checking if the item already exists in the test environment before attempting to create it.
*/
// Using https://github.com/stripe/stripe-php
@markjaquith
markjaquith / Laracon US 2023.md
Created July 20, 2023 21:29
Rough notes from Laracon US 2023

These notes are super rough, and I didn’t take notes for a couple sessions. Let me know if you found them useful or they helped you remember things presented at the conference! @markjaquith on Twitter.

Pest PHP

by Nuno Maduro

[!question] How do snapshots work in CI? Won’t there not be an existing snapshot when the tests run?

Cool new features

@Apatrid
Apatrid / lightbox-modal.html
Created November 24, 2020 09:29
Alpine.js + TailwindCSS Lightbox Modal
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alpine.js-TailwindCSS-Lightbox-Modal</title>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
</head>
<body>
@ano
ano / index.html
Created April 24, 2020 20:47
One Page Swagger / OpenAPI
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>ServiceDesk Service Swagger</title>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist@3.12.1/swagger-ui.css">
</head>
<body>
@lelledaniele
lelledaniele / EntityBase.php
Last active June 4, 2023 19:44
symfony doctrine updatedAt createdAt updated_at created_at fields timestamp
<?php
namespace AppBundle\Mapping;
use Doctrine\ORM\Mapping as ORM;
use DateTime;
/**
* Class EntityBase
*
@prasofty
prasofty / margin_padding_helper.css
Last active April 10, 2023 17:29
Margin Padding Helper CSS
.p-0 {
padding: 0px;
}
.p-3 {
padding: 3px;
}
.p-5 {
padding: 5px;
@stephenscaff
stephenscaff / Web Font Async Loader
Created January 16, 2014 09:12
Webfont Loader for Google fonts. (just swapping the: WebFontConfig={ typekit: {id: 'myKitId'} };
WebFontConfig={
google:{families:["Lato:400,700,300,100:latin"]}
};
(function(){
var wf = document.createElement("script");
wf.src = ("https:" == document.location.protocol ? "https":"http") +
"://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js";
wf.type="text/javascript";
wf.async="true";