Skip to content

Instantly share code, notes, and snippets.

@T1mL3arn
T1mL3arn / CbTypeAlias.hx
Last active August 18, 2016 12:26
Macro to generate static fields with CbType's from enum
package;
enum CbTypeAlias
{
PLAYER; ENEMY; ITEM;
}
@T1mL3arn
T1mL3arn / MainMenu.xml
Created October 4, 2016 06:53
HaxeDevelop/FlashDevelop main menu TortoiseGit commands
<!--
1. Find MainMenu.xml (It helps you - http://www.flashdevelop.org/wikidocs/index.php?title=Configuration)
2. Put this menu item in MainMenu.xml below any other menu you want
3. Restart FD/HD
-->
<menu label="&amp;GIT" name="GIT">
<button label="&amp;Init Repository" click="RunProcess" tag="$(Quote)git$(Quote);init $(ProjectDir)" image="274|0|4|4" />
<!-- shortcut is Ctrl+Shift+? -->
<button label="&amp;Add Current File" click="RunProcess" tag="$(Quote)C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe$(Quote);-command add -path $(Quote)$(CurFile)$(Quote)" image="304|0|4|4" shortcut="Control|Shift|OemQuestion"/>
<!-- shortcut is Ctrl+Shift+> -->
@T1mL3arn
T1mL3arn / tasks.json
Created August 8, 2017 08:13
VSCode tasks.json tasks to work with web-ext util.
/*
NOTE:
it is only part of actual syntax and contains
task configurations for web-ext console command,
not a whole tasks.json!
MORE:
web-ext repo:
@T1mL3arn
T1mL3arn / README.md
Created April 5, 2018 11:50
Set of metadata keys to start developing a userscript
// ==UserScript==
// @name EmuParadise download script
// @version 1
// @description Downloads games directly after clicking their name
// @author Eptun
// @require https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @match https://www.emuparadise.me/*/*/*
// @grant none
// ==/UserScript==
@T1mL3arn
T1mL3arn / readme.md
Created October 17, 2018 12:27
Violentmonkey themes

CSS themes for Violentmonkey extension

For now there is no way to select theme for code editor. So it is needed to do it manualy (with some tweaks) via VM's settings. VM use CodeMirror - there you can find more themes.

About tweaks

Replace new theme classes with VM's predefined .cm-s-eclipse. Note: that can be not enough due to selectors' specifity.

@T1mL3arn
T1mL3arn / Future.hx
Last active October 24, 2023 09:02
Simple Future implementation with Haxe language
class Future {
static final PENDING = 1;
static final FULL = 2;
var state:Int = PENDING;
var result:Any = null;
var next:Array<Any->Void> = [];
public function new(){}
@T1mL3arn
T1mL3arn / readme.md
Created February 17, 2024 02:49
Testing: null check then function call time measurement

Link: https://try.haxe.org/#782Ea8D1

Results

12:34:38:706   Test.hx:15:,testing...
12:34:52:920   Test.hx:48:,AVERAGE results:
12:34:52:921   Test.hx:50:,test "null check" took 0.07856666666666662 seconds
12:34:52:921   Test.hx:50:,test "null with empty" took 0.2395333333333334 seconds
12:34:52:921 Test.hx:50:,test "only empty" took 0.15176666666666686 seconds