Skip to content

Instantly share code, notes, and snippets.

@michal-m
michal-m / sblam_updater.sh
Created March 15, 2012 11:14
Sblam Updater
#!/usr/bin/env bash
# Autoupdater for SBLAM! blacklist and converter to nginx deny format
# Based on sblam_nginx.sh by Marcin M. (exine):
# https://bitbucket.org/exine/scriptlets/src/tip/sblam/sblam_nginx.sh
BLACKLIST="http://sblam.com/blacklisthtaccess.txt" # Adress of the source blacklist
HTACCESS="/usr/local/www/apache22/data/.htaccess" # Under this path blacklist will be saved. Do NOT set this to any file that needs to contain something else than blacklist, it is cleared every time this script runs
DATE=`date` # Do not change unless you know what you're doing
TMP_BLACKLIST="/tmp/spammer_blacklist.txt"
touch ${TMP_BLACKLIST}
@michal-m
michal-m / IE-disable-compatibility-view.bat
Created February 17, 2012 13:05
Disable Compatibility View in Internet Explorer
@ECHO off
SETLOCAL
:: let's get the IE version first
SET qry=REG QUERY "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v Version
SET fnd=FINDSTR /I /L /C:"REG_SZ"
FOR /f "Tokens=2*" %%u IN ('%qry%^|%fnd%') DO ( SET IEVerReg=%%v )
FOR /f "Tokens=1,2,3,4 Delims=." %%a IN ("%IEVerReg%") DO ( SET IEVerMaj=%%a&SET IEVerMin=%%b&SET IEVerBld=%%c&SET IEVerRev=%%d )
IF %IEVerMaj% EQU 9 IF %IEVerMin% GEQ 10 SET IEVerMaj=10
@michal-m
michal-m / README.md
Created February 9, 2012 16:42
SVN Export of files changed between two revisions

svn-rev-diff-export

svn-rev-diff-export is a handy bash snippet that allows you to export files changed between two revisions.

Usage

svn-rev-diff-export.sh -u <path> -f revFROM -t revTO -o <path>

Options

-f, --rev-from revFROM