Skip to content

Instantly share code, notes, and snippets.

View anandiamy's full-sized avatar

Anandia Muhammad Yudhistira anandiamy

  • Indonesia
View GitHub Profile
@anandiamy
anandiamy / backup-mysql.sh
Last active March 28, 2020 13:05
Backup Mysql and Delete file 7 days ago
#!/bin/sh
DATE=`date +%d%b-%H%M%S`
unset PATH
# USER VARIABLES
MYSQLUSER=your-user
MYSQLPWD=your-password
MYSQLHOST=localhost
MYSQLBACKUPDIRROOT=~/backup/mysql
@anandiamy
anandiamy / MinioUrlGenerator.php
Created July 2, 2019 01:09
MinioUrlGenerator
<?php
namespace App\Services;
use Spatie\MediaLibrary\UrlGenerator\S3UrlGenerator;
class MinioUrlGenerator extends S3UrlGenerator
{
/**
* Get the url for a media item.
@anandiamy
anandiamy / MinIOStorageServiceProvider.php
Created July 2, 2019 00:53
MinIOStorageServiceProvider
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Aws\S3\S3Client;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use League\Flysystem\Filesystem;
use Storage;