Skip to content

Instantly share code, notes, and snippets.

// File format:
//
// Roughly based on INI style configs.
//
// 'Key=Value' pairs, one pair per line. If a line contains more than one '=',
// the first is taken to be the deliminator and the rest are included as part
// of the value string.
//
// A line containing a key but no value (i.e., no '='), will be parsed as an
// entry with an empty value string.
@ACEfanatic02
ACEfanatic02 / rust_shell.ps1
Created October 30, 2014 04:51
Powershell script to sanitize $ENV:PATH so that existing MinGW install doesn't interfere with Rust.
$mingwPath = "C:\MinGW\bin" # Replace with MinGW path from $ENV:PATH
$pathArray = $ENV:PATH.Split(";")
$newPath = ""
Foreach ($p in $pathArray) {
if (!$p.Equals($mingwPath)) {
$newPath += ";"
$newPath += $p
}
}
#include "brt.h"
#include <windows.h>
#include <psapi.h>
struct WorkingSetParams {
HANDLE process_handle;
size_t min_working_set;
size_t max_working_set;
DWORD flags;