This file contains hidden or 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
// Haxe’s macro support makes for a golden opportunity for building | |
// program metadata during compiletime. I think it would be very cool | |
// to be able to preprocess interpolated strings so that text can be | |
// extracted and analyzed separately (NLS?) or, e.g., to do JavaScript-style | |
// tagged string stuff/C#-style FormattableString stuff like automatically | |
// escaping expressions when building HTML, etc. | |
// | |
// However, it looks to me like right now macros are given CStrings | |
// which don’t even let you know if the string will be interpolated or | |
// not. And MacroStringTools.formatString() seems insufficient… |
This file contains hidden or 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
// Haxe’s macro support makes for a golden opportunity for building | |
// program metadata during compiletime. I think it would be very cool | |
// to be able to preprocess itnerpolated strings so that text can be | |
// extracted and analyzed separately (NLS?) or, e.g., to do JavaScript-style | |
// tagged string stuff/C#-style FormattableString stuff like automatically | |
// escaping expressions when building HTML, etc. | |
// | |
// However, it looks to me like right now macros are given CStrings | |
// which don’t even let you know if the string will be interpolated | |
// or not. |
This file contains hidden or 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
import haxe.macro.Expr; | |
class Test { | |
static function main() { | |
var x = 2; | |
var y = 53; | |
var z = 43; | |
x = null; | |
trace(coalesce(x, y, z)); | |
y = null; |
This file contains hidden or 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
var objShell = WScript.CreateObject('WScript.Shell'); | |
objShell.Run('http://turbo.coffee'); |
This file contains hidden or 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
> var x = {} | |
undefined | |
> x['null'] = 2 | |
2 | |
> x['undefined'] = 4 | |
4 | |
> y = {parentId: null,} | |
{ parentId: null } | |
> x[y.parentId] | |
2 |
This file contains hidden or 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
<p> | |
Drag this link to your bookmark toolbar to install this bookmarklet: <a href="javascript:(function()%20{var%20o%20=%20document.getElementsByTagName('input'),%20i%20=%200;%20for%20(;%20i%20<%20o.length;%20i++)%20if%20(o[i].type%20==%20'password')%20o[i].type%20=%20'text';%20undefined;})()">pevil</a> | |
</p> | |
<p> | |
Demo: <input type="password" value="password"/> | |
</p> |
This file contains hidden or 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
#include <stdio.h> | |
int main(int argc, const char *argv[]) { | |
return rename(argv[1], argv[2]); | |
} |
This file contains hidden or 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
ohnobinki@gibby /tmp/.private/ohnobinki/asdf $ mkdir -p a/{b{0,1,2,3},\*\*}/c | |
ohnobinki@gibby /tmp/.private/ohnobinki/asdf $ find . -name node_modules -prune -or -print | |
. | |
./a | |
./a/** | |
./a/**/c | |
./a/b3 | |
./a/b3/c | |
./a/b2 | |
./a/b2/c |
This file contains hidden or 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
using System; | |
using System.Diagnostics; | |
using System.Threading.Tasks; | |
namespace ValueTupleFun | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
This file contains hidden or 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
// Inspired by http://stackoverflow.com/q/13729089/429091 | |
using System; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var appDomain = AppDomain.CreateDomain("Temp AppDomain", null, AppDomain.CurrentDomain.SetupInformation); | |
try |