Skip to content

Instantly share code, notes, and snippets.

View djaiss's full-sized avatar
👋
Maker of open source web softwares.

Regis Freyd djaiss

👋
Maker of open source web softwares.
View GitHub Profile
font_family JetBrains Mono Regular Nerd Font Complete
bold_font JetBrains Mono Bold Nerd Font Complete
italic_font JetBrains Mono Italic Nerd Font Complete
bold_italic_font JetBrains Mono Bold Italic Nerd Font Complete
font_size 14
adjust_line_height 140%
cursor_blink_interval 0
enable_audio_bell 0
@djaiss
djaiss / error.blade.php
Last active November 17, 2023 01:55
Laravel flash notification with alpine which hide after a while
@if (session('error'))
<div x-data="{ show: true }" x-show="show" x-init="setTimeout(() => show = false, 3000)" class="pt-6 mx-auto max-w-xl px-2 sm:px-6 lg:px-8">
<div class="flex items-center overflow-hidden border border-red-200 bg-white shadow-sm dark:bg-gray-800 rounded sm:rounded-lg">
<div class="px-2 py-2 bg-orange-100 mr-2">
<x-heroicon-o-light-bulb class="h-5 w-5 text-red-500" />
</div>
<p>{{ session('error') }}</p>
</div>
</div>
<ItemFilter xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><name>Spriggan Form Thorn Totem Shaman Loot Filter</name><filterIcon>14</filterIcon><filterIconColor>10</filterIconColor><description>Strict Filter to farm only useful items. Loot Filter made for a guide "Walking Sim - Spriggan Form Thorn Totem Shaman Build Guide".</description><lastModifiedInVersion>0.9.2.5</lastModifiedInVersion><lootFilterVersion>2</lootFilterVersion><rules><Rule><type>HIDE</type><conditions><Condition i:type="RarityCondition"><rarity>NORMAL</rarity></Condition></conditions><color>0</color><isEnabled>true</isEnabled><levelDependent>false</levelDependent><minLvl>0</minLvl><maxLvl>0</maxLvl><emphasized>false</emphasized><nameOverride /></Rule><Rule><type>HIDE</type><conditions><Condition i:type="RarityCondition"><rarity>MAGIC</rarity></Condition></conditions><color>0</color><isEnabled>true</isEnabled><levelDependent>false</levelDependent><minLvl>0</minLvl><maxLvl>0</maxLvl><emphasized>false</emphasized><nameOverride /></Rule><Ru
# Block Product hunt IPv4
127.0.0.1 www.producthunt.com
127.0.0.1 producthunt.com
# Block Product hunt IPv6
fe80::1%lo0 www.producthunt.com
fe80::1%lo0 producthunt.com
@djaiss
djaiss / employees.csv
Created March 2, 2021 20:42
Example of CSV file for OfficeLife
First Name Last Name Email
Eric Ramzy [email protected]
<?php
namespace App\Console\Commands;
class SetupDummyAccount extends Command
{
/**
* The name and signature of the console command.
*
* @var string
@djaiss
djaiss / 2020_06_30_211833_create_hardware_table.php
Created August 20, 2020 19:35
Example of `is_dummy` field in the database
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateHardwareTable extends Migration
{
/**
* Run the migrations.
@djaiss
djaiss / CreateExpense.php
Created August 20, 2020 18:54
Exemple of service in PHP for Laravel
<?php
namespace App\Services\Company\Employee\Expense;
use Carbon\Carbon;
use App\Helpers\MoneyHelper;
use App\Jobs\NotifyEmployee;
use App\Jobs\LogAccountAudit;
use App\Services\BaseService;
use App\Jobs\LogEmployeeAudit;
@djaiss
djaiss / laravel-test-job-dispatches-other-jobs.php
Created August 15, 2020 14:06
How to test that a job dispatches another job in Laravel
<?php
namespace Tests\Unit\Jobs;
use Tests\TestCase;
use Illuminate\Support\Facades\Queue;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class FirstJobTest extends TestCase
{
#!/usr/bin/env bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
###############################################################################
# General UI/UX #
###############################################################################