- 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 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
#!/usr/bin/env sh | |
runuser -u sail -- php "$@" | |
# 1. Copy or mount this script into the laravel.test container. | |
# 2. Setup your remote PHP interpreter in PhpStorm to use the script as "PHP Executable" |
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
const detectHorizontalOverflow = (root) => { | |
root = root || document; | |
const { offsetWidth } = document.documentElement; | |
let previousOverflowing = null; | |
let overflowingCount = 0; | |
root.querySelectorAll('*').forEach((el) => { | |
const { right } = el.getBoundingClientRect(); | |
if (right > offsetWidth) { | |
// Ignore the children of overflowing elements. The issue is probably their parents. | |
if (previousOverflowing === null || !previousOverflowing.contains(el)) { |
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
#!/usr/bin/env bash | |
NC='\033[0m' # No Color | |
YELLOW='\033[0;33m' | |
CYAN='\033[0;36m' | |
GREEN='\033[0;32m' | |
RED='\033[0;31m' | |
MAGENTA='\033[0;35m' | |
notify_about_actions_required() { | |
changed_files="$(git diff-tree -r --name-status --no-commit-id $1 $2)" |
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
18097783 | |
GG fire ice | |
Lava Ti and Si <1 | |
Ir 2.7 | |
Cu 1.1 | |
Starter base nah | |
29679915 | |
GG and outer fire ice | |
Lava ti + Si <1 |
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
/** | |
* 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 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\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 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
/^([^0-9]*)([0-9]*)\s*([A-Z]?)[,\s]*([0-9]*)?(st|kl)?[\.,\s]*([a-zæøå]*)?(\d{0,4})?.*$/mi |
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
// 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