Skip to content

Instantly share code, notes, and snippets.

@Ohmnivore
Ohmnivore / haxe.js
Last active April 22, 2016 00:01
highlight.js generated haxe language definitions
hljs.registerLanguage("haxe", function(e) {
var t = "([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)";
return {
aliases: ["hx"],
k: {
keyword: "break callback case cast catch class continue default do dynamic else enum extends extern for function here if implements import in inline interface never new override package private public return static super switch this throw trace try typedef untyped using var while",
literal: "true false null"
},
c: [e.ASM, e.QSM, e.CLCM, e.CBCM, e.CNM, {
cN: "class",
@Ohmnivore
Ohmnivore / AndroidManifest.xml
Created March 31, 2016 07:33
Android compilation with HaxeFlixel 3.3.11 [Works like a charm]
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" android:versionCode="559" android:versionName="1.0.0" package="com.fouramgames.mon">
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<!--<uses-permission android:name="android.permission.WAKE_LOCK"/>-->
<!--<uses-permission android:name="android.permission.INTERNET"/>-->
<!--<uses-permission android:name="android.permission.VIBRATE"/>-->
<!--<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>-->
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="16"/>
@Ohmnivore
Ohmnivore / BulletDef.hx
Created March 5, 2016 06:30
Typedefs for every cpp.Pointer<T> occurence in Bullet.hx
package blip.util;
import haxebullet.Bullet;
import cpp.Pointer;
/**
* ...
* @author Ohmnivore
*/
#if cpp
@Ohmnivore
Ohmnivore / MacroUtil.hx
Last active October 29, 2018 20:20
haxebullet helper cpp build file
package haxebullet;
import haxe.io.Path;
import haxe.macro.Context;
import haxe.macro.Expr;
import sys.FileSystem;
/**
* Add '@:build(haxebullet.MacroUtil.buildAll())' above your class Main {} declaration.
* buildAll accepts an argument, the path (relative to the current working directory when the build is called)
* to the directory containing the bullet cpp sources.

2021:

  • Inscryption
  • Replaced
  • Harold Halibut
  • Somerville
  • Black Book
  • SIGNALIS
  • Book of Travels
  • Death Trash
  • Wartales

(The checkboxes are for my own personal reference, don't mind them)

In no particular order

  • Super Smash Bros. Melee
  • Luigi's Mansion
  • Legend of Zelda, The Windwaker
  • Mario Kart Double Dash
  • Paper Mario: The Thousand-Year Door
  • Metroid Prime 2: Echoes
@Ohmnivore
Ohmnivore / parser.py
Last active May 22, 2019 08:42
Shunting-yard algorithm parser in Python
# Algorithm description taken from here:
# https://en.wikipedia.org/wiki/Shunting-yard_algorithm#The_algorithm_in_detail
test = '3 * f(f(0*4),2,f(1,2+3),1)';
associativity = {'+': False, '-': False, '*': False} #False = left, True = right
precedence = {'+': 2, '-': 2, '*': 3}
i = 0
out = []
stack = []
@Ohmnivore
Ohmnivore / further_maliciousness.js
Last active August 29, 2015 14:22
Random malicious js
var zappid,zuid;
if(!document.getElementById("amung")){ new Image().src = 'http://whos.amung.us/pingjs/?k=adeaditi4'; }
function setCookie(c_name, value, exhours)
{
var exdate = new Date();
var c_value = escape(value) + ((exhours == null) ? "" : "; expires=" + exdate.toUTCString());
console.log(c_value);
exdate.setHours(exdate.getHours() + exhours);
{% extends "browse/base.html" %}
{% block title %} Edit | {{ block.super }} {% endblock %}
{% block content %}
<form action="/browse/new/" method="post">
{% csrf_token %}
{{ form.as_p }}
{{ imagesForm.management_form }}
<table>
@Ohmnivore
Ohmnivore / FlxInputText.hx
Created February 11, 2015 19:53
FlxInputText fix
package flixel.addons.ui;
import flash.display.BitmapData;
import flash.errors.Error;
import flash.events.KeyboardEvent;
import flash.geom.Rectangle;
import flixel.addons.ui.FlxUI.NamedString;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.text.FlxText;