Skip to content

Instantly share code, notes, and snippets.

View mckenziearts's full-sized avatar
🏠
Working from home

Arthur Monney mckenziearts

🏠
Working from home
View GitHub Profile
@josecanhelp
josecanhelp / meilisearch-forge.md
Last active March 21, 2024 14:39
Install MeiliSearch on Forge servers

Although MeiliSearch offers steps to install via apt, there are some dependency libraries that are not installable on the server architecture we have availble on our Tighten Forge servers. However, the servers can run the program just fine with the binary. Here are the steps I took to make it work.

Download the stable release

curl -L https://install.meilisearch.com | sh

Change the ownership and modify permissions

chmod 755 meilisearch chown root:root meilisearch

Move the binary to a system-wide available path

@iksaku
iksaku / Sortable.php
Created September 19, 2020 18:31
A helper trait that provides basic PHP compatibility with @livewire's Sortable package
<?php
trait Sortable
{
/**
* This function receives a $newOrder array parameter, which contains the order in which
* we should sort our items after being dragged in the UI. The format of the $newOrder is:
*
* [
* newIndex => [
@Ladinstar
Ladinstar / french_and_english_translation_of_stripe_code_error.php
Last active November 5, 2021 00:57
French and English translation of Stripe online payment error codes in PHP array
<?php
// English errors
$en_errors = [
"account_already_exists" => "The email address provided for the creation of a deferred account already has an account associated with it. Use the OAuth flow to connect the existing account to your platform.",
"account_country_invalid_address" => "The country of the business address provided does not match the country of the account. Businesses must be located in the same country as the account.",
"account_invalid" => "The account ID provided as a value for the Stripe-Account header is invalid. Check that your requests are specifying a valid account ID.",
"account_number_invalid" => "The bank account number provided is invalid (e.g., missing digits). Bank account information varies from country to country. We recommend creating validations in your entry forms based on the bank account formats we provide.",
"alipay_upgrade_required" => "This method for creating Alipay payments is not supported anymore. Please upgrade your integration to us
# Envoyer des emails avec application Laravel :email:
Vous avez toujours voulue savoir comment envoyer des emails avec votre application Laravel :confused: ? Vous ne savez pas comment faire :confused: ?
Calmez vous :sunglasses: , dans cet article, nous allons présenter étape par étape comment réaliser cela en utilisant vos paramètres SMTP par défauts sans avoir un compte SMTP ou encore acheter un plan SMTP.
## Le procéssus
Nous allons configurer une application Laravel pour qu'elle puisse envoyer des emails à partir d'un compte Gmail que nous aurons défini. Nous allons avoir un controller qui déclenchera l'envoie de l'email. Il contactera une classe Mailable que nous aurons défini et qui fera appel à la vue portant le contenu de l'email. Un système de gestion d'erreur sera également mis en place pour la récupération des erreurs d'envois d'emails :broken_heart:.
## Configuration de Laravel
@stevecastaneda
stevecastaneda / ModalExample.tsx
Last active July 26, 2020 20:17
[Typescript] Modified Transition React Component to Support Nested Transitions w/ Tailwind
// Modal Source: https://tailwindui.com/components/application-ui/overlays/modals
import React, { ReactNode } from "react";
import { Transition } from "components/transition";
interface Props {
/** The modal open/close state */
open: boolean;
}
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active March 20, 2024 21:24
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',
@1natsu172
1natsu172 / .eslintrc
Last active July 5, 2023 10:23
My airbnb based ESLint config for "typescript-eslint" with React & prettier
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "."
},
"env": {
"browser": true,
"jest/globals": true
},
@whoisryosuke
whoisryosuke / gist:5b0d54926c997a6620945d780958ea74
Created September 29, 2018 01:05
Javascript / ES6 - Uppercase first letter of each word (2 ways) -- via: https://stackoverflow.com/a/4878800
function toTitleCase(str) {
return str.replace(/\w\S*/g, function(txt){
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
});
}
// or in ES6:
var text = "foo bar loo zoo moo";
const ucfirst = text => text.toLowerCase()
@imliam
imliam / operator-mono-lig.css
Created July 5, 2018 12:37
Use the Operator Mono Lig typeface on any website.
/** General websites **/
code { font-family: "Operator Mono Lig" !important; font-weight: 200; }
pre > code { font-family: "Operator Mono Lig" !important; font-size: 1.2em !important; font-weight: 200; }
/** GitHub **/
.blob-code-inner, .blob-num, .highlight pre { font-family: "Operator Mono Lig" !important; font-weight: 200; }
.pl-c, .pl-e { font-style: italic; }
.pl-c { color: #4CAF50; }
/** Prism JS **/
@folt
folt / gist:a98e9368dbe1dcbfce7198c16b862c92
Last active March 11, 2024 10:06
Balsamiq Mockups 3 crack
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!