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\Http\Middleware; | |
use Inertia\Middleware; | |
class HandleInertiaRequests extends Middleware | |
{ | |
public function share(Request $request) | |
{ |
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\Http\Middleware; | |
use Inertia\Middleware; | |
class HandleInertiaRequests extends Middleware | |
{ | |
public function share(Request $request) | |
{ |
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
#!/bin/bash | |
# Number of seconds a query is allowed to execute before it is killed. (default: 3h) | |
MAX_EXEC_TIME=${1:-10800} | |
MYSQL_USER=your-mysql-user | |
mysql -sNB -e "SHOW FULL PROCESSLIST" \ | |
| sed 's/\t/ /g' \ | |
| sed 's/ \+/ /g' \ | |
| while read process_id user host db command_type time state info time_ms rows_sent rows_examined; do |
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
module.exports = { | |
root: true, | |
env: { | |
browser: true, | |
node: true, | |
}, | |
extends: [ | |
'eslint:recommended', | |
'plugin:vue/vue3-recommended', | |
'prettier' |
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\Providers; | |
use App\Listeners\LogSentMessage; | |
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; | |
use Illuminate\Mail\Events\MessageSent; | |
class EventServiceProvider extends ServiceProvider | |
{ |
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
# Fail2Ban filter to scan Apache access.log for DoS attacks | |
[INCLUDES] | |
before = common.conf | |
[Definition] | |
# Option: failregex | |
# Notes.: regex to match GET requests in the logfile resulting in one of the | |
# following status codes: 401, 403, 404, 503. | |
# The host must be matched by a group named "host". The tag "<HOST>" |
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
module.exports = { | |
root: true, | |
env: { | |
browser: true, | |
node: true, | |
}, | |
parserOptions: { | |
parser: '@babel/eslint-parser', | |
requireConfigFile: false, | |
}, |
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
ALGOLIA_INDEX=dev_articles | |
ALGOLIA_APP_ID=ABCDE12345 | |
#ALGOLIA_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
ALGOLIA_SEARCH_ONLY_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
ALGOLIA_HITS_PER_PAGE=5 | |
ALGOLIA_QUERY_BUFFER_TIME=300 |
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
- hosts: webservers | |
tasks: | |
# Install Composer the lightweight way (without using installer) | |
# https://getcomposer.org/download | |
- name: Composer | Install Composer latest-stable | |
get_url: | |
url: https://getcomposer.org/download/latest-stable/composer.phar | |
checksum: 'sha256:https://getcomposer.org/download/latest-stable/composer.phar.sha256sum' | |
dest: /usr/local/bin/composer.phar |
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
#!/usr/bin/env python3 | |
# | |
# Copyright (c) 2021 Philip Iezzi, Onlime GmbH - https://www.onlime.ch | |
# | |
import argparse | |
import subprocess | |
header = """SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT; | |
SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS; |
NewerOlder