Skip to content

Instantly share code, notes, and snippets.

Avatar
👋
Maker of open source web softwares.

Mazarin djaiss

👋
Maker of open source web softwares.
View GitHub Profile
View gist:38a6e086046e64a4486090a890ae6f73
# 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 Mar 2, 2021
Example of CSV file for OfficeLife
View employees.csv
First Name Last Name Email
Eric Ramzy eric.ramzy@gmail.com
View setup_dummy_account.php
<?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 Aug 20, 2020
Example of `is_dummy` field in the database
View 2020_06_30_211833_create_hardware_table.php
<?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 Aug 20, 2020
Exemple of service in PHP for Laravel
View CreateExpense.php
<?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 Aug 15, 2020
How to test that a job dispatches another job in Laravel
View laravel-test-job-dispatches-other-jobs.php
<?php
namespace Tests\Unit\Jobs;
use Tests\TestCase;
use Illuminate\Support\Facades\Queue;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class FirstJobTest extends TestCase
{
View osx default
#!/usr/bin/env bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
###############################################################################
# General UI/UX #
###############################################################################
View caskrc
#!/usr/bin/env bash
# Ask for the administrator password upfront
sudo -v
# setup taps
brew tap caskroom/fonts
brew tap caskroom/cask
# install applications
@djaiss
djaiss / cloudSettings
Created Mar 4, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2020-03-04T01:23:15.400Z","extensionVersion":"v3.4.3"}
View gist:cef7e730182a8b787c20a4a1c3f56f14
/**
* Display a listing of the resource.
*
* @param Request $request
*
* @return \Illuminate\View\View|\Illuminate\Http\RedirectResponse
*/
public function index(Request $request)
{
$user = auth()->user();