Skip to content

Instantly share code, notes, and snippets.

View theQuazz's full-sized avatar

Jesse Rogers theQuazz

View GitHub Profile
➜ island-troll-tribes git:(master) ✗ java -jar ~/.wurst/wurstscript.jar -runtests _build/*.j _build/dependencies wurst
java.io.IOException: Cannot run program "wine": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at de.peeeq.wurstio.Pjass.runPjass(Pjass.java:105)
at de.peeeq.wurstio.Main.doCompilation(Main.java:399)
at de.peeeq.wurstio.Main.main(Main.java:142)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
TARGET = kernel.elf
CC = arm-none-eabi-gcc
AS = arm-none-eabi-as
LD = arm-none-eabi-gcc
DM = arm-none-eabi-objdump
CPPFLAGS = -MMD \
-MP \
-Wall \
# update brew
brew update
# open the caskroom
brew tap caskroom/cask
# this is the GCC cross-compiler
brew cask install gcc-arm-embedded
# this is the emulator
@theQuazz
theQuazz / unions.c
Last active August 29, 2015 14:10
crazy unions
enum student_t {
STUDENT,
GRADED_STUDENT
};
struct Student {
char *name;
};
@theQuazz
theQuazz / gist:5588043
Created May 15, 2013 22:47
JASS Function Interfaces Its not actually ActionScript
scope SomeExample initializer onInit
// requires DamageEvent
// not sure how scoping will work...
function AhhWeJustGotDamaged takes unit damagedUnit, unit damageSource, real damage returns nothing
debug call BJDebugMsg( "We just took " + R2S( damage ) + " damage!" );
endfunction
private function onInit takes nothing returns nothing
call RegisterDamageResponse( Response.AhhWeJustGotDamaged )
//! zinc
library ZnPublicLibrary {
Table pets;
function GetPlayersPet (player p) -> unit {
group g = CreateGroup();
GroupEnumUnitsOfPlayer(g, p, Condition( function() -> boolean {
return pets.has(GetUnitTypeId(GetEnumUnit()));
library MageMasher initializer InitTrig_MageMasher requires ID, DUMMYLIB,
globals
integer array MAGE_MASHER_CLASSES
integer MAGE_MASHER_CLASSES_UB
private trigger t = CreateTrigger()
private trigger u = CreateTrigger()
endglobals
function CheckMasherTroll takes nothing returns boolean
library MageMasher initializer InitTrig_MageMasher requires ID, DUMMYLIB
globals
integer array MAGE_MASHER_CLASSES
integer MAGE_MASHER_CLASSES_UB
endglobals
function CheckMasherTroll takes nothing returns boolean
local integer uid = GetUnitTypeId(GetTriggerUnit())
local integer i = 0
library UnitIDs initializer init
globals
constant integer UNIT_MAGE = 'O00U'
constant integer UNIT_ELEMENTALIST = 'O00R'
constant integer UNIT_HYPNOTIST = 'O00D'
constant integer UNIT_DEMENTIA_MASTER = 'O014'
constant integer UNIT_PRIEST = 'O00P'
constant integer UNIT_BOOSTER = 'O00G'
constant integer UNIT_MASTER_HEALER = 'O00S'
@theQuazz
theQuazz / gist:3735216
Created September 17, 2012 02:17
mage masher code
function mashSilence takes nothing returns boolean
if ( not ( GetRandomPercentageBJ() <= 21.00 ) ) then
return false
endif
return true
endfunction
function checkmashertroll takes nothing returns boolean
if ( ( GetUnitTypeId(GetAttackedUnitBJ()) == 'O00U' ) ) then
return true