View .eslintrc.js
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' |
View EventServiceProvider.php
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 | |
{ |
View action.d_apache-get-dos.conf
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>" |
View .eslintrc.js
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, | |
}, |
View .env
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 |
View install-composer.yml
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 |
View mysql-recursive-dump.py
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; |
View build-encryption-key.sh
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 | |
# | |
# This script usually is called on the first login and asks for a password | |
# to build the LUKS + ZFS encryption keys which then are stored only in volatile | |
# memory /mnt/ramfs (ramfs). | |
# This script is added to your /root/.profile in order you won't forget to | |
# build the encryption key each time you reboot the server. | |
# | |
# We are using ramfs instead of tmpfs as there is no swapping support in | |
# ramfs which is good in a security perspective. |
View .gitlab-ci.yml
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
image: node:current | |
variables: | |
# In case you did not set up $SSH_KNOWN_HOSTS variable: | |
# SSH_OPTS: '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' | |
SSH_OPTS: '' | |
BASE_DIR: public_html/blog | |
KEEP: 5 | |
default: |
View zfs-destroy-snapshots.py
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 | |
""" | |
Helper script to remove old ZFS snapshots | |
Copyright (c) Onlime GmbH, https://www.onlime.ch | |
""" | |
import argparse | |
from re import compile | |
from datetime import datetime, timedelta | |
from subprocess import check_output | |
import sys |
NewerOlder