Skip to content

Instantly share code, notes, and snippets.

@spider1163
spider1163 / ngxdis
Last active April 5, 2018 10:49 — forked from fideloper/ngxdis
Nginx scripts for enable and disabling a site. This will create or destroy a symlink between a real config file in /etc/nginx/sites-available and a symlink in /etc/nginx/sites-enabled.
#!/usr/bin/env bash
if [ $EUID -ne 0 ]; then
echo "You must be root: \"sudo ngxdis\""
exit 1
fi
# -z str: Returns True if the length of str is equal to zero.
if [ -z "$1" ]; then
echo "Please choose a site."
@spider1163
spider1163 / remove_crw.cmd
Created September 12, 2015 13:31 — forked from xvitaly/remove_crw.cmd
Remove telemetry updates for Windows 7 and 8.1
echo Uninstalling KB3075249 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart
echo Uninstalling KB3080149 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3080149 /quiet /norestart
echo Uninstalling KB3021917 (telemetry for Win7)
start /w wusa.exe /uninstall /kb:3021917 /quiet /norestart
echo Uninstalling KB3022345 (telemetry)
start /w wusa.exe /uninstall /kb:3022345 /quiet /norestart
echo Uninstalling KB3068708 (telemetry)
start /w wusa.exe /uninstall /kb:3068708 /quiet /norestart