Skip to content

Instantly share code, notes, and snippets.

View armornick's full-sized avatar

Nick Arnoeyts armornick

View GitHub Profile
@armornick
armornick / NIA_EquipSkillCommands.js
Created August 17, 2018 04:37
RPG Maker MV plugin to show the skills added by a piece of equipment
/*:
@plugindesc Show equipment skills on equip menu
@author armornick
@param Equipment Skills Text
@desc The label to show above the equipment skills list.
@default Equipment Skills
@help
@armornick
armornick / NIA_SimpleCrafting.js
Last active February 2, 2025 07:30
Simple crafting system for RPG Maker MV
/*:
@plugindesc Simple crafting system.
@author armornick
----------------------------------------------------
@help
Adds a simple crafting system with a simple crafting menu.
@armornick
armornick / generator.js
Last active March 30, 2018 03:59
Node-based Project Generator (templates not included)
var Generator = (function () {
var Mustache = require("./lib/mustache.min.js"),
fs = require("fs")
function Generator() {
this.templateDir = null
this.config = null
}
@armornick
armornick / embed.cpp
Created March 6, 2018 08:35
Embed text file as C string
#include <cstdio>
#include <cctype>
#include <string>
#include <vector>
#include <sstream>
#include <algorithm>
#include <stdexcept>
#define FILE_LIST_FN "file_list.txt"
@armornick
armornick / xml.cpp
Last active November 23, 2016 07:50 — forked from anonymous/xml.cpp
Duktape bindings for TinyXML 2
#include <duktape.h>
#include <tinyxml2.h>
using namespace tinyxml2;
// -----------------------------------------------------------------------------
// XmlNode Object structure & utility functions
// -----------------------------------------------------------------------------
#define DUKWIN_XMLNODE_PROTOTYPE "$DukwinXmlNodePrototype"
@armornick
armornick / list-cpls.cpp
Created April 12, 2016 18:43
List control panel applets and allow the user to open them
/*
List and load Control Panel applets
Based on this article:
https://blogs.msdn.microsoft.com/oldnewthing/archive/2003/12/26/45979.aspx
And this section of MSDN:
https://msdn.microsoft.com/en-us/library/windows/desktop/cc144185(v=vs.85).aspx
KNOWN BUGS:
@armornick
armornick / RequestFile.cpp
Created March 3, 2016 12:05
How to request a file via the Windows API using both the old and new method
#include <windows.h>
#ifdef UNICODE
/*
IT FUCKING WORKS WITH G++ FUCKING GODDAMIT!!!88!!!
g++ -municode -s -static -Os -o openfiledialog-gnu openfiledialog.cpp -lshell32 -luuid -lole32 -DUNICODE -D_UNICODE -D_WIN32_WINNT=_WIN32_WINNT_VISTA -DNTDDI_VERSION=NTDDI_VISTA
NOTE: forgive the expletives but it took several days to get this working and it turned out I forgot to define the version macros
@armornick
armornick / custom.specs
Created February 19, 2016 05:29
My personal custom GCC specs file
%rename cpp super_cpp
*cpp:
%(super_cpp) %{municode:-D_UNICODE} -DNTDDI_VERSION=0x06000000 -DWINVER=0x0600 -D_WIN32_WINNT=0x0600
*libgcc_link:
%{shared-libgcc:-lgcc_s -lgcc} %{static|static-libgcc|!shared-libgcc:-lgcc -lgcc_eh}
*libgcc:
%{mthreads:-lmingwthrd} -lmingw32 %(libgcc_link) -lmingwex -lmsvcr120
@armornick
armornick / flexbox.less
Created June 6, 2015 14:09
Less Flexbox mixins (translation from sass)
// mixins based on code from:
// https://github.com/mastastealth/sass-flex-mixin/blob/master/_flexbox.scss
.flexbox() {
display: -webkit-box;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flexbox;
display: flex;
}