https://gist.github.com/timdetering/9fe9d3ece2e1b2232589821fd7f33318
A collection of common Git tips and tasks.
| // | |
| // Copyright (c) Microsoft Corporation. All rights reserved. | |
| // | |
| // | |
| // Use of this sample source code is subject to the terms of the Microsoft | |
| // license agreement under which you licensed this sample source code. If | |
| // you did not accept the terms of the license agreement, you are not | |
| // authorized to use this sample source code. For the terms of the license, | |
| // please see the license agreement between you and Microsoft or, if applicable, | |
| // see the LICENSE.RTF on your install media or the root of your tools installation. |
| #! /usr/bin/python | |
| import pip | |
| import sys | |
| from subprocess import call | |
| def pip_upgrade(): | |
| if sys.version_info > (3, 0): | |
| # Python 3 code in this block |
https://gist.github.com/timdetering/9fe9d3ece2e1b2232589821fd7f33318
A collection of common Git tips and tasks.
The Secret Workings of Jamis Buck's Dungeon Generator
So you've tried my Dungeon Generator http://www.aarg.net/~minam/dungeon.cgi once or twice, and it's got you thinking. Perhaps you're a programmer and would like to incorporate similar features in a program of your own. Or maybe you're not a programmer, but would be interested in an overview of how this program works.
Either way, I've been asked how this random dungeon generator works many, many times, and I finally decided that, to save myself time, I'd just put up the description on a web page.
If you find this explanation useful, please let me know. Likewise, if you feel that I was too technical, or not technical enough, or too ambiguous, let me know that, too, and I can try and improve it.
| // | |
| // The VersionInfo.cs file contains default assembly attributes that describe the common assembly attributes. | |
| // Assembly specific attributes and values should be defined in the AssemblyInfo.cs file of the individual assemblies. | |
| // These attributes are placed into the metadata for the assembly that is read by Windows and install programs. | |
| // | |
| // Based on blog post: | |
| // http://blog.xoc.net/2012/11/using-assembly-attributes-in-net.html | |
| // | |
| // To update run: | |
| // curl -L https://gist.github.com/timdetering/e8cd043606beb2e4d2f8230898e81d37/raw/ > ./VersionInfo.cs |
| using System; | |
| namespace DisposableExample | |
| { | |
| //------------------------------------------------------------------- | |
| /// <summary> | |
| /// Provides the base implementation for the <see cref="T:System.IDisposable"/> interface. | |
| /// </summary> | |
| /// <seealso cref="https://gist.github.com/timdetering/b99bc162443d95ed6f9e5e62e03bbefc"/> | |
| /// <seealso cref="https://gist.github.com/thinktainer/5633464"/> |
| public class DeleteToRecycleBin | |
| { | |
| [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 1)] | |
| public struct SHFILEOPSTRUCT | |
| { | |
| public IntPtr hwnd; | |
| [MarshalAs(UnmanagedType.U4)] | |
| public int wFunc; | |
| public string pFrom; | |
| public string pTo; |