Skip to content

Instantly share code, notes, and snippets.

:shipit:
Hiding in the shadows…

Markus Birth mbirth

:shipit:
Hiding in the shadows…
Block or report user

Report or block mbirth

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
View prds.txt
PRD-63116-001 Unlocked BBB100-1 (USA)
PRD-63116-003 Bell BBB100-1
PRD-63116-005 BBB100-1
PRD-63116-007 BBB100-1
PRD-63116-009 BBB100-1
PRD-63116-010 BBB100-1
PRD-63116-013 BBB100-1
PRD-63116-017 BBB100-1
PRD-63116-020 BBB100-1
PRD-63116-021 BBB100-1 (HK?)
@mbirth
mbirth / README.md
Created Apr 26, 2017
AES implementations in Python3, PHP and JavaScript
View README.md

Python3: AES / Rijndael

Usually, you should use PyCrypto from the python-crypto package. But if you want to code in Python3, there's no fast hybrid((i.e. mostly C-code, partly Python-code)) implementation of such a library.

Using Google, you will most probably stumble on Bram Cohen's Rijndael implementation in pure Python. I took his code and made it Python3 ready by replacing all xrange() by range(), all divisions (/) by integer-divisions (//) and made the string.join() working. There were no more changes neccessary.

@mbirth
mbirth / tt2srt.py
Last active May 6, 2019 — forked from adammw/tt2srt.py
Timed Text Captions to SRT Subtitles converter script
View tt2srt.py
#!/usr/bin/env python
# Usage: python tt2srt.py source.xml output.srt
# FROM: https://gist.github.com/adammw/915259
from xml.dom.minidom import parse
import sys
def fixTime(time):
# 00:00:00.000
return time.replace(".", ",")
View copy-git-file.sh
#!/bin/bash
#Inspired by http://blog.neutrino.es/2012/git-copy-a-file-or-directory-from-another-repository-preserving-history/
#Copy a file or directory out of a git repository, preserving history!
#Creates DESTINATIONPATH with patches that can be applied with git am
#e.g.
#0001-Add-new-theme-Gum.patch
#0002-Add-syntax-highlighting-for-Gum-theme.patch
#0003-Gum-Fix-tag-URLs-not-being-slugified-and-therefore-b.patch
#0004-Gum-Add-Disqus-support.patch
#0005-Gum-Use-article-title-as-the-title-of-the-generated-.patch
@mbirth
mbirth / mrpe_oraclebackup.cmd
Created Jun 19, 2014
Nagios/Check_MK NRPE/MRPE check to monitor Oracle database backups. Will return "OK" if there was a database backup completed in the last 30 hours and CRIT otherwise.
View mrpe_oraclebackup.cmd
@echo off
set USERNAME=%1
set PASSWORD=%2
set DB=%3
if "x%USERNAME%x"=="xx" goto syntax
if "x%PASSWORD%x"=="xx" goto syntax
if "x%DB%x"=="xx" goto syntax
goto syntaxok
@mbirth
mbirth / prep_dgrp_dkms.sh
Created May 26, 2014
Script to download and prepare DigiPort kernel modules for DKMS. THIS WILL ONLY MANAGE THE KERNEL MODULES, NOT THE ADDITIONAL INIT-SCRIPTS! Install the additional scripts by removing the line "FULLPACKAGE = FULLPACKAGE" from Makefile and running ´make install´.
View prep_dgrp_dkms.sh
#!/bin/bash
# Get sources from: http://www.digi.com/support/productdetail?pid=3037
if [ ! -x /usr/sbin/dkms ]; then
echo "DKMS not found. Install DKMS (from RepoForge) before running this script."
exit 1
fi
# Download latest source as of 2014-05-26
echo "Downloading latest sources (if download fails, check http://www.digi.com/support/productdetail?pid=3037 for an updated URL)..."
@mbirth
mbirth / nma_notify
Created May 23, 2014
Check_MK Flexible Notifications script to notify about incidents via Notify My Android (NMA!) service.
View nma_notify
#!/bin/bash
# Notify My Android
API_KEY=0123456789abcdef0123456789abcdef0123456789abcdef
EOL=$'\n'
if [ $NOTIFY_WHAT == "HOST" ]; then
STATE=$NOTIFY_HOSTSTATE
else
STATE=$NOTIFY_SERVICESTATE
fi
@mbirth
mbirth / mrpe_mod_loaded.sh
Created May 22, 2014
Nagios/Check_MK NRPE/MRPE check to monitor for kernel modules. Will throw a critical when the specified kernel module is not loaded. Also returns performance data.
View mrpe_mod_loaded.sh
#!/bin/bash
if [ "$1" = "" ]; then
echo "USAGE:"
echo "$0 <kernel-mod>"
exit 99
fi
MOD=$1
STATUS=`lsmod | grep "$MOD"`
@mbirth
mbirth / mrpe_git.sh
Created May 15, 2014
Nagios/Check_MK NRPE/MRPE check to monitor local files for changes using Git. Will throw a warning when files have been changed and show the unified diff in the long status output. Performance data is also returned.
View mrpe_git.sh
#!/bin/bash
DIR=$1
if [ -z "${DIR}" ]; then
echo "Syntax: $0 git-root"
exit 1
fi
cd $DIR
STATUS=`git diff --shortstat --exit-code`
CODE=$?
cd - >/dev/null
@mbirth
mbirth / GetADUsersExcel.vba
Last active Nov 12, 2015
Queries the Active Directory (via LDAP) for users belonging to ExampleGroup or one of its subgroups. The resulting users are written into the first Excel sheet.
View GetADUsersExcel.vba
' Based on a VBA script of Jim Ward
Sub LDAPQueryDevices()
Dim grouppaths(500) As String
Dim groupnames(500) As String
Dim headers2 As Variant
headers2 = Array("GroupName", "Name", "Login", "DN", "Group1", "Group2")
Const xlAscending = 1
Const xlDescending = 2
You can’t perform that action at this time.