Skip to content

Instantly share code, notes, and snippets.

View Varriount's full-sized avatar

Clay Sweetser Varriount

View GitHub Profile
@Varriount
Varriount / error.txt
Created January 18, 2011 19:07
Bravo error on startup
C:\Users\Parents\Desktop\Beta\bravo>twistd -ny bravo.tac
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\twisted-10.2.0-py2.6-win32.egg\twisted\pyt
hon\usage.py", line 413, in __str__
return self.getSynopsis() + '\n' + self.getUsage(width=None)
File "C:\Python26\lib\site-packages\twisted-10.2.0-py2.6-win32.egg\twisted\pyt
hon\usage.py", line 449, in getUsage
for (cmd, short, parser, desc) in self.subCommands:
File "C:\Python26\lib\site-packages\twisted-10.2.0-py2.6-win32.egg\twisted\app
lication\app.py", line 616, in subCommands
@Varriount
Varriount / SkinPacker.java
Created June 28, 2012 02:17
SkinPacker - fixed version for null element cases.
/*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Varriount
Varriount / ScalableSkinPacket.java
Created July 15, 2012 23:05
Scalable Skin Packer
package com.varriount.pluzzle.components;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.NinePatch;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
public class ScalableNinePatch extends NinePatch {
package com.varriount.arteme.components;
import com.artemis.Component;
/**
* A component which holds renderable objects.
* TODO Add type safety, explore for alternatives.
* @author Clay
*
*/
@Varriount
Varriount / Mypy Grammar
Last active December 14, 2015 02:59
Started on functions. Created section for just mypy-specific versions of grammer. The original python version should either be kept the same, or reduced to follow mypy's constraints
# Grammar for Python
# Note: Changing the grammar specified in this file will most likely
# require corresponding changes in the parser module
# (../Modules/parsermodule.c). If you can't make the changes to
# that module yourself, please co-ordinate the required changes
# with someone who can; ask around on python-dev for help. Fred
# Drake <fdrake@acm.org> will probably be listening there.
# NOTE WELL: You should also follow all the steps listed in PEP 306,
@Varriount
Varriount / test.nim
Created October 7, 2013 03:21
Nimrod compiler segfault error.
C:\Users\Clay\Projects\nimrod-scripts>nimrod compile test.nim
c:\nimrod\config\nimrod.cfg(36, 2) Hint: added path: 'C:\Users\Clay\.babel\pkgs\
' [Path]
Hint: used config file 'C:\Nimrod\config\nimrod.cfg' [Conf]
Hint: system [Processing]
Hint: test [Processing]
Traceback (most recent call last)
nimrod.nim(79) nimrod
nimrod.nim(55) HandleCmdLine
main.nim(308) MainCommand
@Varriount
Varriount / Dtest.txt
Created October 11, 2013 20:59
Data type lengths for nimrod
# Windows 64 Bit Types
sizeof(pointer): 8
sizeof(cstring): 8
sizeof(cint): 4
sizeof(clong): 4
sizeof(cuint): 4
sizeof(culong): 8
sizeof(int): 8
sizeof(uint): 8
sizeof(int16): 2
from osproc import execCmdEx
when isMainModule:
var output, exitcode = execCmdEx("7z")
echo(output)
echo(exitcode)
# Functions for accessing the CryptRandGen functions
proc CryptGenRandom(
hProv:HCRYPTPROV,
dwLen:DWORD,
pbBuffer:ptr BYTE
):WINBOOL {.stdcall,
dynlib: "Advapi32", importc: "CryptGenRandom".}
proc CryptAcquireContext(
#define FOR_EACH0(objName, pDisp, szMember) { \
IEnumVARIANT * xx_pEnum_xx = NULL; \
DISPATCH_OBJ(objName); \
if (SUCCEEDED(dhEnumBegin(&xx_pEnum_xx, pDisp, szMember))) { \
while (dhEnumNextObject(xx_pEnum_xx, &objName) == NOERROR) {
#define FOR_EACH1(objName, pDisp, szMember, arg1) { \
IEnumVARIANT * xx_pEnum_xx = NULL; \
DISPATCH_OBJ(objName); \
if (SUCCEEDED(dhEnumBegin(&xx_pEnum_xx, pDisp, szMember, arg1))) { \