Skip to content

Instantly share code, notes, and snippets.

SamwiseFilmore MggMuggins

Block or report user

Report or block MggMuggins

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# ./drinkOverlay /path/to/lotr/assets /path/to/output/dir
# $0 $1 $2
cd $1
cd lotr/textures/items
# Make sure we have the overlays
MggMuggins /
Last active Aug 2, 2017
My Personal D style Guide

D Style Guide

My personal style guide for the D programming language. This document outlines best practices that I have found to help with D source code readability and cleanliness.

General Statements

Take a moment to think about what you spend the most time doing when you are writing a program. Is it typing? Certainly not. Is it looking through documentation? Arguably. Is it reading the mess you've written and trying to understand it? Most of the time.

Code readability is very important. If no one (including you!) can read your code, you've done somthing wrong. The vast majority of our time as programmers is spent reading and understanding either our code or someone else's. The majority of this document focuses on code quality as code readability. The rules defined here are designed to make your code easier to read and easier to follow.

One thing this document does not claim to do is to make code easier to write. In fact, it does quite the opposite. Making code easy to read is inherently making it har

View chrysalis.swift
import Glibc
import Qlift
class ChrysalisFM {
let app = QApplication()
let window = QMainWindow()
let mainWidg = QWidget()
var layout: QHBoxLayout
let v_layout = QVBoxLayout()
MggMuggins / fileAppend.d
Created Apr 8, 2017
Small D program to do some stuff with a file.
View fileAppend.d
* Pseudocode
* Read Infomation on what needs to happen from the user
* Open file
* Read each line of the file to an array of strings
* Apply operations to array of strings
* Write each element of the array to the file
* Syntax:
* Arguments go in this order: Input File, Output file, Prefix, Suffix
MggMuggins / tradingPrices.d
Last active Jan 16, 2017
A little program written in D to calculate the price range of items in LOTR mod trading from the average price.
View tradingPrices.d
import std.stdio;
float readValue (string text) {
float output;
readf(" %s", &output);
return output;
void printOut (float large, float small) {
You can’t perform that action at this time.