This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package; | |
class Main { | |
public static function main() { | |
Params.fromQueryString("?foo=bar&thing=true&num=12"); | |
Params.get("foo", "cool"); // 'bar' ('foo' is defined) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package; | |
import haxe.macro.*; | |
class Hacky { | |
public static function build() { | |
var fields = Context.getBuildFields(); | |
for (field in fields) { | |
if (field.name == "random") { // Here we target the `random()` method of the Math class. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A quick baseline grid overlay using css+svg. | |
* Inspired by [Basehold.it](https://basehold.it/). | |
* @author leshido | |
*/ | |
body { | |
position: relative; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Resize document width to fix Samsung Galaxy stock-browser render freeze on touch bug: | |
if (/Android/.test(navigator.userAgent) && !(/Chrome/.test(navigator.userAgent))) | |
{ | |
var ds = document.documentElement.style; | |
var origW = ds.width; | |
ds.width = "101%"; | |
setTimeout(function() { ds.width = origW; }, 500); | |
} |