Skip to content

Instantly share code, notes, and snippets.

View onlime's full-sized avatar

Philip Iezzi (Pipo) onlime

View GitHub Profile
@onlime
onlime / HandleInertiaRequests.php
Last active April 4, 2023 20:21
Vue3-toastify in Laravel/Inertia.js/Vue/Tailwind
<?php
namespace App\Http\Middleware;
use Inertia\Middleware;
class HandleInertiaRequests extends Middleware
{
public function share(Request $request)
{
@onlime
onlime / accounts.list
Last active May 4, 2023 12:08
imapsync script to migrate multiple IMAP accounts in a row
# <SRCUSER> <SRCPW> <DSTUSER> <DSTPW>
@onlime
onlime / action.d_apache-get-dos.conf
Created September 9, 2021 13:52
Using a Fail2ban jail to mitigate against simple DoS attacks against Apache
# 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>"
@onlime
onlime / install-composer.yml
Created August 21, 2021 23:24
Small Ansible playbook to install latest-stable Composer
- 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
@onlime
onlime / .eslintrc.js
Last active May 7, 2024 08:54
ESLint/Prettier config for Vue 3 in VS Code
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'prettier'
@onlime
onlime / .eslintrc.js
Created August 30, 2021 21:37
Configure ESLint and Prettier for Vue/Nuxt.js project in VS Code
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
parserOptions: {
parser: '@babel/eslint-parser',
requireConfigFile: false,
},