Skip to content

Instantly share code, notes, and snippets.

View tastewar's full-sized avatar

Tom Stewart tastewar

  • MEDITECH
  • Arlington, MA
View GitHub Profile
@bitshifter
bitshifter / PurgeStandbyList.cpp
Last active June 19, 2024 19:42
Command line utility for purging Window's standby list. Requires /MANIFESTUAC:"level='highestAvailable'.
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
#define STATUS_PRIVILEGE_NOT_HELD ((NTSTATUS)0xC0000061L)
typedef enum _SYSTEM_INFORMATION_CLASS {
SystemMemoryListInformation = 80, // 80, q: SYSTEM_MEMORY_LIST_INFORMATION; s: SYSTEM_MEMORY_LIST_COMMAND (requires SeProfileSingleProcessPrivilege)
} SYSTEM_INFORMATION_CLASS;
@feesta
feesta / device.txt
Last active December 18, 2015 10:39
Hello World for Max72xx and a 4 digit 7-segment display (Electric Imp device code)
// Hello World for Max72xx and a 4 digit 7-segment display (Electric Imp device code)
hardware.pin7.configure(DIGITAL_OUT);
hardware.spi189.configure(SIMPLEX_TX, 10000);
function send(data) {
hardware.pin7.write(0); // set CS before sending data
hardware.spi189.write(data);
hardware.pin7.write(1); // release CS after sending data
}