Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
peak awesomeness imminent

Bryan Casey TheCase

💭
peak awesomeness imminent
View GitHub Profile
View Repair synology BTRFS volume
btrfs fi show -d
(/dev/mapper/vg1000-lv)
syno_poweroff_task -d
(or: umount /volume1)
(or2: umount /volume1 -f -k)
Check to see if all us unmounted:
df -h
@TheCase
TheCase / filebeats-remove_ansi_coloring.yaml
Last active Feb 4, 2020
Filbeats - remove ansi control characters for colored logs
View filebeats-remove_ansi_coloring.yaml
- script:
when:
regexp:
message: "[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]"
lang: javascript
id: remove_ansi_color
source: >
function process(event) {
var msg = event.Get("message")
var regex = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g