Skip to content

Instantly share code, notes, and snippets.

View deathbeam's full-sized avatar

Tomas Slusny deathbeam

  • Slovakia
  • 09:22 (UTC +02:00)
View GitHub Profile
@deathbeam
deathbeam / gist:42e5ee0a9a96410a796f
Last active August 29, 2015 14:09
Assets structure for NON
[desktop]
icon-16.png - android/assets/icon-16.png
icon-32.png - android/assets/icon-32.png
icon-64.png - android/assets/icon-64.png
icon-192.png - android/assets/icon-192.png
icon-256.png - android/assets/icon-256.png
splash-desktop.png- android/assets/splash-desktop.png
langs/ - android/assets/langs/
[android]
@deathbeam
deathbeam / i2r.java
Last active August 29, 2015 14:16
Mirah import -> require
import java.util.regex.*;
class ItoR {
public static void main (String[] args) {
String source = "require \"non/Graphics\"\n" +
"require \"non/graphics\"\n" +
"require \"non/GFX\"\n" +
"require \"non/Audio\"\n";
System.out.println(source + "\n");
Pattern pattern = Pattern.compile("(\\s*)(require)(\\s?)(\")(.+)(\")");
@deathbeam
deathbeam / beautifull.moon
Created August 10, 2015 18:58
MoonScript is beautifull
with non
name = .project.name
music = .audio.newSource("music.ogg")
image = .graphics.newImage("image.png")
.load = ->
.audio.play(music)
.draw = ->
.graphics.print("Hello #{name}")
enum Some {
One,
Two,
Three
}
class Thing {
public String name, password, another;
public Some thing;
}
@deathbeam
deathbeam / Pseudo.java
Created August 18, 2015 20:13
Pseudo vecicka :D
//pseudooooo
new ArrayList() {{
add(something);
add(something);
}};
//pseudooooo
new ArrayList() {
ArrayList () {
super();
@deathbeam
deathbeam / WixList.java
Created August 19, 2015 10:59
Wix list
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.lang3.reflect.FieldUtils;
public static class WixList<T> extends ArrayList<T> {
/**
* Adds an item if it isnt already present
@deathbeam
deathbeam / project.lua
Last active August 29, 2015 14:28
Kaizo example project in current state
project('kaizo')
name = 'kaizo'
version = '0.0.1'
namespace = 'Kaizo'
csharp = {
type = 'exe',
source = '../../src',
output = 'out',
@deathbeam
deathbeam / Main.rb
Last active September 23, 2015 12:06
Raxe example
# Require some other modules
require "openfl/display/Sprite"
require "openfl/events/Event"
require "openfl/Lib"
# Set type of this module to class and extend it by OpenFL sprite
module class extends Sprite
# Module variables
def static appname = "My Application"
@deathbeam
deathbeam / Raxefile
Last active November 2, 2015 11:05
Raxefile example
-- vim: set ft=rb:
-- We can also use Haxe libraries
fs = require("sys/FileSystem")
-- Set default target to build()
def default = build
def build()
-- Copy something
@deathbeam
deathbeam / test.rb
Created October 16, 2015 05:15
Maybe new syntax
import haxe.unit.TestCase
import haxe.unit.TestRunner
module self
def main = () =>
def r = TestRunner.new()
r.add(MyTests.new())
r.run()
class MyTests < TestCase