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
PUT _ingest/pipeline/laravel | |
{ | |
"description": "Parses Laravel log files.", | |
"processors": [ | |
{ | |
"rename": { | |
"field": "message", | |
"target_field": "event.original" | |
} | |
}, |
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
# Adds Ctrl+P funcionality similar to Ctrl+T in fzf to open a file directly in vim from the command line | |
command -v fzf >/dev/null 2>&1 || { exit 0; } | |
# Optional to use Ripgrep, comment this out if otherwise | |
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --glob "!{.git,node_modules}/*"' | |
fzf-ctrlp-widget() { | |
local file="$(__fsel)" | |
local ret=$? |
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
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 730 |
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 | |
TMUX_TAIL=$(which "tmux-tail-f.sh") || { echo "This script requires tmux"; exit 1; } | |
LARAVEL_DATE=`date +%Y-%m-%d` | |
sudo $TMUX_TAIL -t "./storage/logs/laravel-worker.log" "./storage/logs/laravel-${LARAVEL_DATE}.log" "/var/log/nginx/error.log" "/var/log/nginx/access.log" |
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 | |
# By mapio | |
# https://github.com/mapio/tmux-tail-f/blob/master/tmux-tail-f | |
TMUX=$(type -p tmux) || { echo "This script requires tmux"; exit 1; } | |
SESSION="$TMUX-tail-f-$$" | |
NOKILL=0 |