Skip to content

Instantly share code, notes, and snippets.

Boris Manojlovic bmanojlovic

Block or report user

Report or block bmanojlovic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bmanojlovic
bmanojlovic / xip-io.py
Created Nov 20, 2017
Generate base36 encoded host names (xip.io)
View xip-io.py
#!/usr/bin/python3
import ipaddress
import sys
# SO one :)
def base36encode(number):
"""
@bmanojlovic
bmanojlovic / Dockerfile
Last active Jan 27, 2016
Dockerfile and script for testing zabbix3 in dockerized openSUSE Leap 42.1
View Dockerfile
FROM opensuse:42.1
MAINTAINER Boris Manojlovic "boris@steki.net"
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV TERM xterm
RUN zypper -n --gpg-auto-import-keys ref \
&& zypper ar http://download.opensuse.org/repositories/server:/monitoring:/zabbix/openSUSE_Leap_42.1/ zabbix \
@bmanojlovic
bmanojlovic / le-renew.sh
Last active Jun 15, 2017 — forked from erikaheidi/le-renew.sh
Auto renewal for Let's Encrypt Apache
View le-renew.sh
#!/bin/bash
#================================================================
# Let's Encrypt renewal script for Apache on Ubuntu/Debian
# @author Erika Heidi<erika@do.co>
# Usage: ./le-renew.sh [base-domain-name]
# More info: http://do.co/1mbVihI
#================================================================
domain=$1
le_path='/opt/letsencrypt'
le_conf='/etc/letsencrypt'
View pygraylog2
#!/usr/bin/env python
import logging
import requests
import json
from pprint import pprint
session = requests.Session()
session.headers.update({'User-Agent': 'python/gl2syslog', 'Accept': 'application/json'})
View gist:202245a4c7036614e553
import org.graylog2.plugin.Message
rule "Drop vmware guest crap"
when
m : Message( getField("full_message") matches "\\[ warning\\] \\[vmusr:vmusr\\] Error in the RPC receive loop: RpcIn(.|\r|\n)*" );
then
m.setFilterOut(true);
#System.out.println( "[DROOL] : " + m.toString() ); # too verbose crap...
end
View graylog2-apache.conf
<VirtualHost _default_:80>
ServerName graylog.company.com
Redirect permanent / https://graylog.company.com/
</VirtualHost>
##
## SSL Virtual Host Context
##
<IfDefine SSL>
<IfDefine !NOSSL>
@bmanojlovic
bmanojlovic / server.drl
Last active Aug 29, 2015
drool rule for 0.20.x graylog2
View server.drl
import org.graylog2.plugin.Message
rule "Drop vmware guest crap"
when
m : Message( getField("message") matches "\\[ warning\\] \\[vmusr:vmusr\\] Error in the RPC receive loop: RpcIn.*" );
then
m.setFilterOut(true);
#System.out.println( "[DROOL] : " + m.toString() ); # too verbose crap...
end
@bmanojlovic
bmanojlovic / runme.zm
Last active Dec 22, 2015
selenium tricks
View runme.zm
#!/bin/sh -x
export PATH=$PATH:phantomjs-?.?.?-linux-x86_64/bin
./zm.py
@bmanojlovic
bmanojlovic / 002-freebsd_fix_sendfile.patch
Last active Dec 22, 2015
support for freebsd sendfile based on http://www.ioremap.net/node/192/ copy dnet_sendfile.m4 into ZoneMinder dir run autoreconf -i . run ./configure as usual
View 002-freebsd_fix_sendfile.patch
diff --git a/ac_check_sendfile.m4 b/ac_check_sendfile.m4
new file mode 100644
index 0000000..f2aac5a
--- /dev/null
+++ b/ac_check_sendfile.m4
@@ -0,0 +1,63 @@
+AC_DEFUN([AC_CHECK_SENDFILE],[
+AC_MSG_CHECKING([whether sendfile() is supported and what prototype it has])
+
+saved_CFLAGS="$CFLAGS"
You can’t perform that action at this time.