This file contains hidden or 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 | |
for i in 0 1 2 3 4 5 6 7 8 9; do | |
if udevadm info -q all -n /dev/usb/lp$i >/dev/null 2>&1; then | |
echo Found lp$i | |
[ -f /opt/cmkbon/printer ] || unlink /opt/cmkbon/printer | |
ln -s /dev/usb/lp$i /opt/cmkbon/printer | |
fi | |
done |
This file contains hidden or 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
input { | |
beats { | |
port => 50441 | |
ssl => false | |
} | |
} | |
filter { | |
if "communigate-log" in [tags] { | |
grok { |
This file contains hidden or 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 | |
CIURL="https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img" | |
ZTURL="https://download.zerotier.com/zerotier-one-x64.deb" | |
PWD=$(pwd) | |
TEMP=$(mktemp -d) | |
HOSTNAME=$1 | |
ROOTPW=abcd1234 | |
# output colors | |
CYAN=$(echo -ne "\033[00;36m") |
This file contains hidden or 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
# shorthands | |
alias sl="ls --color" | |
alias txfv="tar xfv" | |
alias hgr="history | grep " | |
alias apti="apt install " | |
alias apts="apt search " | |
alias lsb="lsb_release -a" | |
alias ls="ls --color " | |
alias ll='ls -l --color' | |
alias k="tree" |
This file contains hidden or 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/expect | |
set username [lindex $argv 0] | |
set newpassword [lindex $argv 1] | |
spawn telnet 127.0.0.1 106 | |
expect "*ready*" | |
send "USER postmaster\r" | |
expect "300 please send the PASS" | |
send "PASS postmaster_password_here\r" |
This file contains hidden or 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 | |
CYAN=$(echo -ne "\033[00;36m") | |
GREEN=$(echo -en '\033[01;32m') | |
MAG=$(echo -en '\033[01;35m') | |
YEL=$(echo -en '\033[00;33m') | |
NOCOL=$(echo -ne "\E[0m") | |
CREATED=$(date) | |
cd /vz |
This file contains hidden or 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
FQDNLookup true | |
LoadPlugin syslog | |
<Plugin syslog> | |
LogLevel info | |
</Plugin> | |
LoadPlugin cpu | |
LoadPlugin df | |
LoadPlugin disk |
This file contains hidden or 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
#include <ESP8266WiFi.h> | |
#include <WiFiUDP.h> | |
#include <Adafruit_Sensor.h> | |
#include <DHT.h> | |
#include <DHT_U.h> | |
WiFiUDP Udp; | |
const char* ssid = "ky-fi devices"; | |
const char* password = "passwordremovedyayayaya"; |
This file contains hidden or 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 | |
echo $output = (new CheckMKLocalcheck("test-email-rtt")) | |
->setValue(305) | |
->setText("Some other text: :value:") | |
->setMetric("seconds", 20) | |
->setKPI(CheckMKLocalcheck::STATE_WARN, 300) | |
->setKPI(CheckMKLocalcheck::STATE_CRIT, 500) | |
->export() . PHP_EOL; |
This file contains hidden or 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 | |
class CheckMKLocalcheck { | |
private $text = "Value returned: :value:"; | |
private $metrics = array(); | |
private $name; | |
private $value; | |
private $kpis = array( | |
self::STATE_WARN => "1", | |
self::STATE_CRIT => "2" |