View IsMobile.hx
/**
* Type definitions for <https://github.com/kaimallea/isMobile>
* Don't forget to add the actual script in the head of the html.
*
* @author Mark Knol
*/
@:native("isMobile")
extern class IsMobile
{
public static var apple(default,null):{phone:Bool, ipod:Bool, tablet:Bool, device:Bool};
View haxe.json
{
"For Loop": {
"prefix": "for",
"body": [
"for (${element} in ${list}) {",
"\t$0",
"}"
],
"description": "Insert Haxe for loop for iterables"
},
View toolbar.xml
<button label="Git Sync" click="RunProcess" tag="$(Quote)C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe$(Quote);-command sync -path $(Quote)$(ProjectDir)$(Quote)" image="59" />
<button label="Git Pull" click="RunProcess" tag="$(Quote)C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe$(Quote);-command pull -path $(Quote)$(ProjectDir)$(Quote)" image="71" />
<button label="Git Push" click="RunProcess" tag="$(Quote)C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe$(Quote);-command push -path $(Quote)$(ProjectDir)$(Quote)" image="72" />
<button label="Git Commit" click="RunProcess" tag="$(Quote)C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe$(Quote);-command commit -path $(Quote)$(ProjectDir)$(Quote)" image="258" />
<button label="Git Commit (current file only)" click="RunProcess" tag="$(Quote)C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe$(Quote);-command commit -logmsg $(Quote)$(TypName)$(Quote) -path $(Quote)$(CurFile)$(Quote)" image="80" />
<button label="Git Switch" click="RunProc
View regexps.md

replace (#123489) to github link

// find:
\((#)(.+?)\)

//replace:
\([$1$2]\(https://github.com/HaxeFoundation/haxe/issues/$2\)\)
View color-palettes.hx
var palette = [["#69D2E7","#A7DBD8","#E0E4CC","#F38630","#FA6900"],
["#FE4365","#FC9D9A","#F9CDAD","#C8C8A9","#83AF9B"],
["#ECD078","#D95B43","#C02942","#542437","#53777A"],
["#556270","#4ECDC4","#C7F464","#FF6B6B","#C44D58"],
["#774F38","#E08E79","#F1D4AF","#ECE5CE","#C5E0DC"],
["#E8DDCB","#CDB380","#036564","#033649","#031634"],
["#490A3D","#BD1550","#E97F02","#F8CA00","#8A9B0F"],
["#594F4F","#547980","#45ADA8","#9DE0AD","#E5FCC2"],
["#00A0B0","#6A4A3C","#CC333F","#EB6841","#EDC951"],
["#E94E77","#D68189","#C6A49A","#C6E5D9","#F4EAD5"],
View browser-support-table.md

Table

Chrome Firefox IE Opera Safari
Latest ✔ Latest ✔ 10+ ✔ Latest ✔ 6.1+ ✔

Code

![Chrome](https://raw.github.com/alrra/browser-logos/master/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/firefox/firefox_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/internet-explorer/internet-explorer_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/safari/safari_48x48.png)
View runner.js
// open F12, paste this in the console. screenshakes!!
window.oldJump = Runner.instance_.tRex.startJump
Runner.instance_.tRex.startJump = function() {
window.oldJump.call(Runner.instance_.tRex, null);
for(i=0;i<30;i++) {
setTimeout(function() {
Runner.instance_.tRex.canvas.style.marginTop = (-10+Math.random()*20) + "px";
Runner.instance_.tRex.canvas.style.marginLeft = (-10+Math.random()*20) + "px";
}, 500 + i * 10);
}
View MacroJsonValidator.hx
/**
* @author Mark Knol
*/
class MacroJsonValidator {
public static macro function validateJson(path:String) {
if (sys.FileSystem.exists(path)) {
var content = sys.io.File.getContent(path);
try {
// Test the json by parsing it.
// It will throw an error when you made a mistake.
View MainTest.hx
package urgame;
import flambe.animation.Sine;
import flambe.asset.Manifest;
import flambe.Entity;
import flambe.System;
class MainTest {
private static function main () {
System.init();
View handbook.md

Build property with inline getter

Virtually adds this property to a class:

public function myVar(get, null):Float;
private inline function get_myVar():Float {
	return 1.5;
}