Skip to content

Instantly share code, notes, and snippets.

View codemercenary's full-sized avatar

Jason Lokerson codemercenary

View GitHub Profile
@codemercenary
codemercenary / configurator.sh
Last active August 16, 2016 21:36
Script I use to build Leap libraries on Windows
#!/usr/bin/env bash
set -e
PREFIX_PATH="C:"
INSTALL_PREFIX="C:"
MAKEINSTALLER=false
PERFORMINSTALL=false
DO_COMPILE=true
print_usage() {
@codemercenary
codemercenary / email_validate.cpp
Last active December 17, 2015 02:45
Stub program to validate an E-mail address
#include <cstdio.h>
int main(int argc, const char* argv[]) {
if(argc != 2)
return 1;
const char* email = argv[1];
// A valid E-mail address is actually quite complex. You will be writing a function will validate a
// subset of these rules. Here, a valid E-mail address will be defined by the following grammar:
@codemercenary
codemercenary / ps_scanner.cpp
Last active May 10, 2016 21:47
Scan the current process for a pattern on Windows
#include <Psapi.h>
#include <vector>
void scan(void* pPattern, size_t ncb) {
static const DWORD pageSize = [] {
SYSTEM_INFO info;
GetSystemInfo(&info);
return info.dwPageSize;
}();