Skip to content

Instantly share code, notes, and snippets.

Silvio Katzmann iamsilvio

Block or report user

Report or block iamsilvio

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
@iamsilvio
iamsilvio / MapCapslockToControl.ps1
Created Oct 16, 2018
Map caps lock to Ctrl on Windows
View MapCapslockToControl.ps1
#-> Map caps lock to control (Run as Admin -> reboot required)
$hexified = "00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00".Split(',') | ForEach-Object { "0x$_"};
$kbLayout = 'HKLM:\System\CurrentControlSet\Control\Keyboard Layout';
New-ItemProperty -Path $kbLayout -Name "Scancode Map" -PropertyType Binary -Value ([byte[]]$hexified);
@iamsilvio
iamsilvio / iis-perfect-fwd-secrecy-tls-1.2.ps1
Last active Dec 6, 2018
powershell to configure IIS for PFS and TLS 1.2
View iis-perfect-fwd-secrecy-tls-1.2.ps1
# for the Cipher Suites Support documentation go to
# https://docs.microsoft.com/en-us/windows/desktop/SecAuthN/cipher-suites-in-schannel
# Version 1.7
Write-Host 'Configuring IIS with SSL/TLS Deployment Best Practices...'
Write-Host '--------------------------------------------------------------------------------'
# Disable Multi-Protocol Unified Hello
@iamsilvio
iamsilvio / deleteonerror.dvtcolortheme
Created Oct 11, 2014
deleteonerror Xcode color theme
View deleteonerror.dvtcolortheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>1 0.886275 0.180392 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>1 0.886275 0.180392 1</string>
@iamsilvio
iamsilvio / youtube-dl-cron.sh
Last active Feb 6, 2018
script to download all videos of a youtube channel (cron)
View youtube-dl-cron.sh
#!bin/bash
timeLogFile='/opt/youtube-dl/time.log'
downloadDirectory='/media/cs-video/Youtube-ch/'
read -r lastTime<$timeLogFile
declare -a arr=("" "")
for playlist in "${arr[@]}"
@iamsilvio
iamsilvio / commit-msg
Created Jul 10, 2013
git commit-msg hook to reject bad formated messages
View commit-msg
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import re
def checkMessage(msg):
"""
Checks if the message content matches one of the message rules
B: <message>
@iamsilvio
iamsilvio / Default (Linux).sublime-keymap
Last active Dec 19, 2015 — forked from coldnebo/Default (Linux).sublime-keymap
Changed Tidy xml to work with Sublime Text 3 Beta 3047 Added Some error output to the console
View Default (Linux).sublime-keymap
[
{ "keys": ["ctrl+shift+x"], "command": "tidy_xml" },
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" }
]
@iamsilvio
iamsilvio / sort_images.py
Created Jun 7, 2013
dirty python script using PIL to remove black pictures from a Folder and tag each picture with a date string from file name! I have used It one time for 60.000 jpg and it works fine. Please do not use this code as a sample of good python code :)
View sort_images.py
from shutil import move
import os
from sys import stdout
from datetime import datetime
from time import time
from PIL import ImageFont, Image, ImageDraw
img_number = 1
black_images = 0
@iamsilvio
iamsilvio / mm-doe.css
Last active Dec 17, 2015
MarkdownPad 2 Dark CSS Preview: look at the first comment because Gist descriptions does not support links! Multi Markdown
View mm-doe.css
/* DeleteOnError stylesheet for MarkdownPad (http://markdownpad.com) */
/* Author: Silvio Katzmann - http://deleteonerror.com */
/* Version: */
/* Source: */
/* --------------------------------------------------------------------RESET */
html, body, div, span, applet, object, iframe, p, blockquote, pre, a, abbr,
acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul,
@iamsilvio
iamsilvio / prowlHandler.py
Created May 13, 2013
a loggingHandler for Python to send notifications via the Prowl API
View prowlHandler.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
class ProwlHandler(logging.Handler):
"""
A handler class which sends a Prowl notification for each logging event.
"""
@iamsilvio
iamsilvio / prow_push.py
Created Mar 23, 2013
quick and dirty prowl push with proxy (keep care to specify a real exception to catch and log if needed)
View prow_push.py
import urllib
import urllib2
API_URL = 'https://api.prowlapp.com/publicapi/add'
API_KEY = 'xxxxxxxxxxxxxxxxxxx'
PROXY = 'xxx.xxx.xxx.xxx:xxxx'
def push():
You can’t perform that action at this time.