Skip to content

Instantly share code, notes, and snippets.

@iamsilvio
iamsilvio / RemoveFoldersFromThisPC.reg
Created May 29, 2019 21:30
Registry keys to to clean up the mess under This PC on Windows 10
Windows Registry Editor Version 5.00
; delete keys for 3D Objects
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}]
; hide Documents Folder from Computer
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag]
"ThisPCPolicy"="Hide"
@iamsilvio
iamsilvio / DisableUselessBingSearchInWindows.reg
Created February 5, 2020 13:21
DisableUselessBingSearchInWindows
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search]
"CortanaConsent"=dword:00000000
"BingSearchEnabled"=dword:00000000
@iamsilvio
iamsilvio / PdfFilePrinter.cs
Created October 20, 2012 22:46
Print PDFs with Adobe Acrobat Reader from c#
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using Microsoft.Win32;
namespace skat.Printserver
{
/// <summary>
/// A wrapper around Adobe Acrobat Reader that helps to print PDF files.
@iamsilvio
iamsilvio / sort_images.py
Created June 7, 2013 11:27
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 :)
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 / iis-perfect-fwd-secrecy-tls-1.2.ps1
Last active June 22, 2022 20:48
powershell to configure IIS for PFS and TLS 1.2
# 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 / alias.zsh
Created April 14, 2021 21:16
ZSH Countdown Timer
ct5() {
AWESOME_COUNTDOWN=$(date --date 'now + 5 minutes' +%s)
}
ct90() {
AWESOME_COUNTDOWN=$(date --date 'now + 90 minutes' +%s)
}
@iamsilvio
iamsilvio / mm-doe.css
Last active March 9, 2021 10:37
MarkdownPad 2 Dark CSS Preview: look at the first comment because Gist descriptions does not support links! Multi Markdown
/* 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 / youtube-dl-cron.sh
Last active November 5, 2020 17:52
script to download all videos of a youtube channel (cron)
#!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 / Mouse.ps1
Last active August 13, 2020 20:30
disable Windows 10 Mouse Properties -> Pointer Options | Enhance pointer precision AKA GamerMode
$RegKey ="HKCU:\Control Panel\Mouse"
Set-ItemProperty -Path $RegKey -Name MouseSpeed -Value 0
Set-ItemProperty -Path $RegKey -Name MouseThreshold1 -Value 0
Set-ItemProperty -Path $RegKey -Name MouseThreshold2 -Value 0
@iamsilvio
iamsilvio / zfs_health_check.sh
Created May 9, 2020 10:50 — forked from Rychu-Pawel/zfs_health_check.sh
ZFS Health Check script for monit. For detailed description and usage go to http://pawelrychlicki.pl/Article/Details/58/zfs-health-check-script-for-monit-09
#! /bin/sh
#
## ZFS health check script for monit.
## v0.9.0.2
#
## Should be compatible with FreeBSD and Linux. Tested on Ubuntu.
## If you want to use it on FreeBSD then go to Scrub Expired section
## and comment two Ubuntu date lines and uncomment two FreeBSD lines
#
## Assumed usage in monitrc (where 80 is max capacity in percentages