Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# gratisdns.sh - A GratisDNS.dk DDNSd module for Synology DSM
#
# Author:
# Brian Schmidt Pedersen (http://blog.briped.net)
#
# Version:
# 1.3.5
@briped
briped / nginx-plexpy-jail.conf
Last active March 29, 2019 07:36
Fail2Ban configuration files for PlexPy behind NGINX Reverse Proxy Raw
# Fail2Ban jail configuration file for PlexPy behind NGINX Reverse Proxy.
# nginx-plexpy.conf
#
# The X-Forwarded-For IP (or any IP for that matter) isn't logged in the PlexPy
# log, and so any failed attempts cannot be blocked using Fail2Ban.
#
# Workaround is to look at all attempts and then set the maxretry number to 5.
# This doesn't protect against distributed attempts.
#
# Author: Brian Schmidt Pedersen
@briped
briped / nginx-domoticz-jail.conf
Last active September 15, 2017 02:13
Fail2Ban configuration files for Domoticz behind NGINX Reverse Proxy
# Fail2Ban jail configuration file for Domoticz behind NGINX Reverse Proxy.
# nginx-domoticz.conf
#
# The X-Forwarded-For IP isn't logged in the Domoticz log, and so any failed
# attempts will show the NGINX reverse proxy IP rather than the actual IP.
#
# Workaround is to look at all attempts and then set the maxretry number to 5.
# This doesn't protect against distributed attempts.
#
# Author: Brian Schmidt Pedersen
@briped
briped / Update-GratisDNS.ps1
Created May 30, 2014 15:56
Quick PowerShell script to update GratisDNS.dk DDNS. Requires PowerShell v3
Param(
$Username = "user",
$Password = "pass",
$Domainname = "domain",
$Hostname = "host"
)
$UpdateURL = "https://ssl.gratisdns.dk/ddns.phtml?u=$Username&p=$Password&d=$Domainname&h=$Hostname"
$ScriptPath = $script:MyInvocation.MyCommand.Path
$IPCacheFile = $ScriptPath.Substring(0,$ScriptPath.LastIndexOf(".")) + "-CachedIP.txt"
--
-- Tellstick Switch Handler
-- Created by: Brian Schmidt Pedersen (@briped)
--
-- The device names from the Tellstick MUST be the same as the device names
-- defined in domoticz, or this script will not work.
--
-- The script is hacked together from several sources, without any knowledge of
-- Lua, so just about everything can probably be done better than my attempt.
-- This also means that no support is given beyond the comments found in this
Function Create-Password {
<#
.SYNOPSIS
Create-Password creates a random password
.DESCRIPTION
This function is used to create random passwords. You can specify what
character types (lowercase letters, uppercase letters, numbers and symbols)
as well as the minimum amount of those character types.
<?php
/*
Plugin Name: Status Press Widget
Plugin URI: http://www.briandgoad.com/blog/status-press-widget/
Description: Adds a Widget to display your Facebook/Twitter/Last.FM/Pownce status in your sidebar.
Version: 1.14
Author: Brian D. Goad
Author URI: http://www.briandgoad.com/blog
*/
/*
@briped
briped / ipa2mdx.sh
Last active October 31, 2015 21:49
#!/bin/bash
clear
if [ $# -lt 2 ]; then
echo "usage: $0 -i inputIpaFile -p provisioning [-c replacementIconFile] [-n 'name to display'] [-b bundleId] [-o outputIpa]" >&2
exit 1
fi
function abspath() {
python -c "import os; print os.path.abspath(\"$1\")"
}
Param(
[parameter(Mandatory=$true,
HelpMessage="Enter one or more AD groups to merge/copy from.")]
[string[]]
$SourceGroups,
[parameter(Mandatory=$true,
HelpMessage="Enter AD group to merge/copy to.")]
[string]
$TargetGroup,
[parameter(Mandatory=$false,
Param(
[parameter(Mandatory=$true,
HelpMessage="Enter AD group to move from.")]
[string]
$SourceGroup,
[parameter(Mandatory=$true,
HelpMessage="Enter AD group to move to.")]
[string]
$TargetGroup
)