Skip to content

Instantly share code, notes, and snippets.

@wrdg
wrdg / BashScriptExecutor.c
Last active February 6, 2024 21:11
DayZ SA Enforce runtime script execution
class BashExecutor
{
// fire and forget, method style execution
static void ExecuteEnf(string code)
{
FileHandle file;
MakeDirectory("$profile:Bash/"); // create directory for logging and execution purposes
string script_path = string.Format("$profile:Bash/script_%1.c", GetDate());
file = OpenFile(script_path, FileMode.WRITE);
@BoyCook
BoyCook / MessageHelper
Created March 3, 2013 12:22
C# Helper file for using WM_DATACOPY in Win32 API
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.InteropServices;
using System.Diagnostics;
public class MessageHelper
{