- Install Chocolatey and Scoop in PowerShell (admin rights)
Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex iwr -useb get.scoop.sh | iex
- Install apps and tools from normal terminal
This file contains 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
/** | |
* The host component/page must have a QTable with ref="table" and :pagination.sync="pagination" | |
* The optimal row count is calculated in relation to the height of the element wrapping the <q-table> | |
*/ | |
const getElementHeight = (el, selector) => { | |
const target = selector ? el.querySelector(selector) : el; | |
return target ? parseFloat(getComputedStyle(target).height) : 0; | |
}; |
This file contains 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\Helpers; | |
use Illuminate\Filesystem\Filesystem; | |
use Spatie\Backup\BackupDestination\Backup; | |
use Spatie\Backup\BackupDestination\BackupCollection; | |
use Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy; | |
class DefaultStrategyButKeepOnlyOneLocalBackup extends DefaultStrategy |
All credit goes to uzegonemad. I've only added the following.
- Now supports Laravel 5.3+ (using
pluck()
method in stead oflists()
) - The methods
attachPermission()
anddetachPermission()
now accept strings (name of the permission) - Permissions are reloaded before
can()
checks to ensure they are up to date.
Entrust is a fantastic role-based permission library for Laravel. However, by design, it only supports attaching permissions to roles, not to users.
This file contains 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
/^([^0-9]*)([0-9]*)\s*([A-Z]?)[,\s]*([0-9]*)?(st|kl)?[\.,\s]*([a-zæøå]*)?(\d{0,4})?.*$/mi |
This file contains 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
// Add to bootstrap/app.php | |
/** | |
* Configure Monolog. | |
*/ | |
$app->configureMonologUsing(function(Monolog\Logger $monolog) { | |
// Make different log files for web and cli to avoid permission problems | |
$filename = storage_path('logs/laravel-'.php_sapi_name().'.log'); | |
$handler = new Monolog\Handler\RotatingFileHandler($filename); | |
$monolog->pushHandler($handler); |
NewerOlder