Skip to content

Instantly share code, notes, and snippets.

@sjoegren
sjoegren / MON-12704-workaround.patch
Last active May 6, 2021 09:19
OP5 Monitor 8.3.0 - Temporarily mitigate hostname-number-name-notification-problem
diff --git a/notify.pl b/notify.pl
index 3e7d971..7a5d26b 100755
--- a/notify.pl
+++ b/notify.pl
@@ -407,7 +407,9 @@ for($i=0; $i<=$#ARGV; $i++) {
# this is a free form variable, so register it
$k = $1;
$v = $2;
- if($v && $v =~ /^\d*$/ && $v > 1000000000) {
+ # Temporary workaround for MON-12704
--- tmp/ninja-monitoring-files.txt 2020-11-19 10:47:37.071507947 +0100
+++ tmp/ninja-monitoring-2020.k.1-p2.ge08bfa4.20201118182502 2020-11-19 10:47:37.055507764 +0100
@@ -1,254 +1,254 @@
-monitor apache drwxr-xr-x /opt/monitor/op5/ninja/modules/monitoring
-monitor apache -rw-r--r-- /opt/monitor/op5/ninja/modules/monitoring/classes.php
-monitor apache drwxr-xr-x /opt/monitor/op5/ninja/modules/monitoring/controllers
-monitor apache -rw-r--r-- /opt/monitor/op5/ninja/modules/monitoring/controllers/backup.php
-monitor apache -rw-r--r-- /opt/monitor/op5/ninja/modules/monitoring/controllers/command.php
-monitor apache -rw-r--r-- /opt/monitor/op5/ninja/modules/monitoring/controllers/config.php
-monitor apache -rw-r--r-- /opt/monitor/op5/ninja/modules/monitoring/controllers/extinfo.php
@sjoegren
sjoegren / vim-tmux-navigator-is-vim.sh
Created April 27, 2018 14:11
vim-tmux-navigator-is-vim workaround for vim-tmux-navigator https://github.com/christoomey/vim-tmux-navigator/issues/195
#!/bin/bash
# Workaround for issue https://github.com/christoomey/vim-tmux-navigator/issues/195
# where vim is running in a subshell.
#
# Usage: Update vim-tmux-navigator config in .tmux.conf with:
# is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
# | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$' \
# || vim-tmux-navigator-is-vim.sh #{pane_tty}"
^[::Send, {U+00E5} ; å
^+[::Send, {U+00C5} ; Å
^'::Send, {U+00E4} ; ä
^+'::Send, {U+00C4} ; Ä
^;::Send, {U+00F6} ; ö
^+;::Send, {U+00D6} ; Ö
#if GetKeyState("Capslock", "T")
{
[::Send, {U+00E5} ; å