Skip to content

Instantly share code, notes, and snippets.

View GER-NaN's full-sized avatar

Gerald Eckert GER-NaN

View GitHub Profile
@GER-NaN
GER-NaN / MouseMover.cs
Last active March 31, 2017 17:19
A console app that moves the mouse and performs clicks.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
/*
Ideas from
http://stackoverflow.com/a/2416762/1363780
@GER-NaN
GER-NaN / hashbytes.sql
Created January 9, 2017 14:19
Using HASHBYTES to calculate decent checksums on table
--Example hashbytes on states table
--https://msdn.microsoft.com/en-us/library/ms174415.aspx
--RoewLength and RowSize were added just for debugging purposes
SELECT
Id = tbl_states.state_id,
Hash = HASHBYTES('MD5', (SELECT tbl_states.* FROM (VALUES(null))X(Y) FOR XML AUTO)),
RowLength = LEN( (SELECT tbl_states.* FROM (VALUES(null))X(Y) FOR XML AUTO)),
RowSize = DATALENGTH( (SELECT tbl_states.* FROM (VALUES(null))X(Y) FOR XML AUTO))
FROM