This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin | |
function getStatus () { | |
ifconfig | grep $1 && return 1 | |
return 0 | |
} | |
while [[ 1 ]]; do | |
getStatus tun0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Traits; | |
use Illuminate\Container\Container; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
use Illuminate\Pagination\Paginator; | |
use Illuminate\Support\Collection; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Traits; | |
use DateTimeImmutable; | |
use Laravel\Passport\Bridge\Scope; | |
use Modules\User\Models\User; | |
use GuzzleHttp\Psr7\Response; | |
use Illuminate\Events\Dispatcher; | |
use Laravel\Passport\Bridge\AccessToken; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if you have a webdav authentication problem with your owncloud instance on an ispconfig server, this gist is for you | |
Go to your site->options->Apache Directive and add : | |
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 | |
Don't forget to increase max upload values, site->options-> custom php.ini : | |
post_max_size = 512M | |
upload_max_filesize = 512M |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Laravel Passport - Customize Token response. | |
* | |
* @author Messi89 OVERGEN <@messi89minou> | |
* @link https://github.com/messi89 | |
*/ | |
namespace App\Http\Controllers\Api; | |
use App\Models\User; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Customize the whoops message in Laravel 5.2 | |
* | |
* Convert the given exception into a Response instance. | |
* | |
* @param \Exception $e | |
* | |
* @return \Symfony\Component\HttpFoundation\Response | |
*/ | |
protected function convertExceptionToResponse(Exception $e) |