Skip to content

Instantly share code, notes, and snippets.

@emnavarro02
emnavarro02 / README.md
Last active May 7, 2024 13:04
Re-index the WSUS Database

The performance of large Windows Server Update Services (WSUS) deployments will degrade over time if the WSUS database is not maintained properly. The WSUSDBMaintenance script is a T-SQL script that can be run by SQL Server administrators to re-index and defragment WSUS databases. It should not be used on WSUS 2.0 databases.This script contributed by the Microsoft WSUS team.

If you are using Windows Internal Database, you will need to use the sqlcmd utility, which can be downloaded from docs.microsoft.com page for SQLCMD. This page will also contain additional information about the sqlcmd utility.

To use this script with Windows Internal Database, you should run the following command:

sqlcmd -S np:\\.\pipe\MICROSOFT##WID\tsql\query -i <script-location>\WSUSDBMaintenance.sql
@troyane
troyane / mp42gif.sh
Last active May 22, 2024 17:20
See script and documentation here: https://github.com/troyane/StackOverflow-pro/tree/master/mp42gif Script to convert MP4 file to GIF (via ffmpeg). It creates intermediate custom color palette out of input video file and use it for resulting GIF for better picture quality. For more info see https://superuser.com/a/556031
#!/bin/bash
#
# Script to convert MP4 video to GIF with generation of custom color palette.
#
#=== Do not touch code below
# Inner variables
input_file=""
input_fps="20"
input_height="512"
@Elwell
Elwell / mq_apc.py
Created February 9, 2012 16:16
apcaccess (APCupsd) to MQTT python script
#!/usr/bin/python
# Script to poll the UPS (via apcupsd) and publish interesting facts to
# MQTT.
# Published under GPL3+ by Andrew Elwell <[email protected]>
import subprocess
# we use mosquitto for the MQTT part