Skip to content

Instantly share code, notes, and snippets.

View renevo's full-sized avatar
🌩️
Building a private cloud!

Tom Anderson renevo

🌩️
Building a private cloud!
View GitHub Profile
@renevo
renevo / program.cs
Last active December 25, 2015 20:29
Pulling ModPack from Git using NGit
using System;
using System.IO;
using NGit;
using NGit.Api;
// USES NuGet package ngit2 for Git.
namespace GitTest
{
class Program
@renevo
renevo / gist:3844307
Created October 6, 2012 07:22
NativeMethods
public static class NativeMethods
{
public static IntPtr GetAndSetWindowFullScreenWindowed(string windowTitle)
{
var minecraftWindow = FindWindowEx(IntPtr.Zero, IntPtr.Zero, null, windowTitle);
if (minecraftWindow == IntPtr.Zero)
{
return IntPtr.Zero;
}
@renevo
renevo / gist:3844304
Created October 6, 2012 07:22
Minecraft Launch
private static void AutoLaunchApplication(IEnumerable<string> commandLineOptions)
{
const string java6Location = @"C:\Program Files\Java\jre6\bin\javaw.exe";
const string java7Location = @"C:\Program Files\Java\jre7\bin\javaw.exe";
var javaLocation = File.Exists(java7Location) ? java7Location : java6Location;
// check for java - eww
if (!File.Exists(javaLocation)) // default java location for both 32/64 bit
{