Skip to content

Instantly share code, notes, and snippets.

Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
@calebsullivan
calebsullivan / remove_crw.cmd
Created May 9, 2016 14:04 — forked from xvitaly/remove_crw.cmd
Remove telemetry updates for Windows 7 and 8.1
@echo off
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)
@calebsullivan
calebsullivan / post-merge
Created April 29, 2016 14:35 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed. In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed. Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
SHOW config_file;
# modify listen_interfaces = '*'
SHOW hba_file;
# modify allowed hosts /0
pg_hba.conf
host all all 0.0.0.0/0 md5
postgresql.conf
vmkfstools -z /vmfs/devices/disks/t10
get-process | stop-process -force
#!/bin/bash
apt-get install software-properties-common
add-apt-repository "deb http://packages.mate-desktop.org/repo/ubuntu precise main"
apt-get update
apt-get --yes --quiet --allow-unauthenticated install mate-archive-keyring
apt-get update
apt-get install mate-core -y'
#!/bin/bash
add-apt-repository ppa:webupd8team/sublime-text-2
apt-get update
apt-get install sublime-text
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate]
"DisableOSUpgrade"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GWX]
"DisableGWX"=dword:00000001
#!/bin/bash
ADDRESS=
NETWORk=
NETMASK=
GATEWAY=
NS1=
NS2=
cat > /etc/network/interfaces <<EOF