git stash
save changes in stash with message and interactive changes
Terminal:
git stash save -p -m "custom message"
list changes in stash
Terminal:
git stash list
get from stash at position 0 witout remove register the stash
Terminal:
git stash apply --index 0
get from stash at position 0 remove register the stash
Terminal:
git stash pop 0
get from stash at position 0 remove register the stash
Terminal:
git stash drop 0
manually stash
Terminal:
man git stash
kscreenlocker nvidia fix
first disable compositor and change to OpenGL3.1
disable blur
Terminal:
nano /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen/LockScreenUi.qml
visible: false
localstack s3 with laravel
first clone
Terminal:
git clone https://github.com/localstack/localstack.git
cd and reset to commit
Terminal:
cd localstack && git reset --hard cd3efec
run with docker-compose
Terminal:
sudo docker-compose up
install aws-cli
Terminal:
pip instasll awscli
create bucket
Terminal:
export AWS_ACCESS_KEY_ID=foo && export AWS_SECRET_ACCESS_KEY=foo && aws --endpoint-url=http://localhost:4572/ s3 mb s3://mybucket $@
add credentials to .env laravel
Terminal:
AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=foo AWS_DEFAULT_REGION=us-east-1 AWS_BUCKET=mybucket AWS_URL=http://localhost:4572/
add new provider
\App\Providers\AwsS3ServiceProvider
Terminal:
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\ServiceProvider;
use Aws\S3\S3Client;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use League\Flysystem\Filesystem;
/**
* Class AwsS3ServiceProvider
* @package App\Providers
*/
class AwsS3ServiceProvider extends ServiceProvider
{
/**
* Perform post-registration booting of services.
*
* @return void
*/
public function boot()
{
Storage::extend('s3', function ($app, $config) {
$args = [
'credentials' => [
'key' => $config[ 'key' ],
'secret' => $config[ 'secret' ],
],
'version' => 'latest',
'region' => $config[ 'region' ],
'endpoint' => $config[ 'url' ],
];
if ( !empty($config[ 'url' ])) {
$args[ 'url' ] = $config[ 'url' ];
}
$client = new S3Client($args);
return new Filesystem(new AwsS3Adapter($client, $config[ 'bucket' ]));
});
}
/**
* Register bindings in the container.
*
* @return void
*/
public function register()
{
//
}
}
add provider to contig/app.php
Terminal:
App\Providers\AwsS3ServiceProvider::class,
Suscribirse a:
Entradas
(
Atom
)
0 comentarios :