🧙♂️
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
global.__require = function () { | |
if (arguments.length <= 0) throw new Error('No arguments provided.'); | |
var join = ''; | |
for (var arg in arguments) { | |
if (arguments.hasOwnProperty(arg)) { | |
join = path.join(join, arguments[arg]); | |
} | |
} | |
return require(join); | |
}; |
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
using Foundation; | |
using System.Runtime.CompilerServices; | |
using System; | |
namespace ViewModels | |
{ | |
public class BaseViewModel : NSObject | |
{ | |
public event EventHandler PropertyChanged = delegate{}; |
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
export class DefaultProxyHandler<T> implements ProxyHandler<T> { | |
public getPrototypeOf(target: T): any { | |
return Object.getPrototypeOf(target); | |
} | |
public setPrototypeOf(target: T, proto: any): boolean { | |
return Object.setPrototypeOf(target, proto); | |
} | |
public isExtensible(target: T): boolean { |
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
public class LocalizedIdentityErrors : IdentityErrorDescriber | |
{ | |
private readonly IStringLocalizer<LocalizedIdentityErrors> _localizer; | |
public LocalizedIdentityErrors(IStringLocalizer<LocalizedIdentityErrors> localizer) | |
{ | |
_localizer = localizer; | |
} | |
public override IdentityError DefaultError() => new IdentityError |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch", | |
"type": "cppvsdbg", | |
"request": "launch", | |
"program": "${workspaceRoot}/target/debug/<APP NAME>.exe", | |
"args": [], | |
"stopAtEntry": false, |
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
import 'package:flutter/widgets.dart'; | |
/// Makes any widget inside clickable and hover-able. | |
/// If the onPressed callback is null, the widget will not catch any | |
/// click events (but still hover events). | |
class Clickable extends StatefulWidget { | |
final Widget Function(BuildContext context, bool isHovered) builder; | |
final VoidCallback? onPressed; | |
const Clickable({super.key, this.onPressed, required this.builder}); |
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
import 'dart:async'; | |
import 'dart:isolate'; | |
class IsolateWorker { | |
IsolateWorker._(this._receivePort, this._sendPort); | |
final ReceivePort _receivePort; | |
final SendPort _sendPort; | |
bool _isDisposed = false; | |
static Future<IsolateWorker> create({String? debugName}) async { |
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
import 'dart:async'; | |
class AsyncLazy<T> { | |
static final _cache = Expando(); | |
final FutureOr<T> Function() _factory; | |
final FutureOr Function(T)? _valueDispose; | |
const AsyncLazy(this._factory, [this._valueDispose]); |