Skip to content

Instantly share code, notes, and snippets.

@shadowfox
shadowfox / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@shadowfox
shadowfox / overviewer_config.py
Created August 29, 2013 22:48
Overviewer config file
# This is a sample config file, meant to give you an idea of how to format your
# config file and what's possible.
# Define the path to your world here. 'My World' in this case will show up as
# the world name on the map interface. If you change it, be sure to also change
# the referenced world names in the render definitions below.
worlds['My World'] = ""
# Define where to put the output here.
outputdir = ""
@shadowfox
shadowfox / DirectoryDialog.cs
Created June 23, 2013 08:26
A dialog the can select either a folder or a file. Only one selection is possible.
using System;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
public class DirectoryDialog
{
/// <summary>
/// The BROWSEINFO structure used by SHBrowseForFolder.
/// See http://msdn.microsoft.com/en-us/library/windows/desktop/bb773205%28v=vs.85%29.aspx
@shadowfox
shadowfox / ArgumentParser.cs
Created June 23, 2013 08:23
Utility class for parsing command line arguments
using System;
using System.Collections.Specialized;
using System.Text.RegularExpressions;
namespace Utilities
{
/// <summary>
/// ArgumentParser class
/// Intelligent handling of command line arguments based on Richard Lopes' (GriffonRL's)
/// class at http://www.codeproject.com/Articles/3111/C-NET-Command-Line-Arguments-Parser
using System;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Utilities
{
/// <summary>
/// Extensions for System.Windows.Forms.RichTextBox
/// </summary>
/// <summary>
/// The BROWSEINFO structure used by SHBrowseForFolder.
/// See http://msdn.microsoft.com/en-us/library/windows/desktop/bb773205%28v=vs.85%29.aspx
/// </summary>
public struct BROWSEINFO
{
public IntPtr hWndOwner;
public int pIDLRoot;
public string pszDisplayName;
public string lpszTitle;