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
| class Generic<T> { | |
| final T that; | |
| Generic(this.that); | |
| } | |
| class TypedGeneric<T extends Object> { | |
| final T that; | |
| TypedGeneric(this.that); | |
| } |
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
| /// Cast Or provide default value (optional or safely defaulted) | |
| /// by the way, "castor" is the french word for beaver... | |
| /// ``` | |
| /// ___ | |
| /// /. .\ | |
| /// =\_t_/= | |
| /// [|] | |
| /// ``` | |
| /// | |
| extension CastOrExtension<T extends Object> on T { |
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
| class Cool { | |
| final int count; | |
| Cool({ int? count = 20 }): this.count = count ?? 20; | |
| } | |
| class NotCool { | |
| final int count; | |
| NotCool({ this.count = 20 }); | |
| } |
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
| console.log('coucouc'); |
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
| enum ManyGenerics<T> { | |
| myInt<int>(defaultValue: 3), | |
| myString<String>(defaultValue: 'hello'); | |
| final T defaultValue; | |
| const ManyGenerics({required this.defaultValue}); | |
| } | |
| typedef WrappedAccess = ({ManyGenerics val}); |
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
| enum ScoreLevel { | |
| rookie, | |
| maestro | |
| } | |
| sealed class MyState { | |
| } |
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 'package:flutter/material.dart'; | |
| /// | |
| /// @see https://api.flutter.dev/flutter/widgets/ValueListenableBuilder-class.html | |
| /// @see https://api.flutter.dev/flutter/foundation/ValueNotifier-class.html | |
| /// | |
| ValueNotifier<int> counter = ValueNotifier<int>(0); | |
| void main() { | |
| runApp(const MyApp()); |
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
| /// | |
| /// @see https://dartpad.dev/660a4ec4fcb91ff648a632705ea4697a | |
| /// | |
| import 'package:flutter_test/flutter_test.dart'; | |
| /// base controller, just to explain the main inheritance | |
| class BaseController {} | |
| class BaseScreen<T extends BaseController> { | |
| late final T controller; |
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
| #!/usr/bin/python | |
| """ | |
| sudo python3 log4jscan.py evaisse -d /System/Volumes/Data/Applications/Transporter.app/Contents/itms/share | |
| Output stuff like this : | |
| Script version: 2.1 (scans jar/war/ear/zip files) | |
| Start scanning on "/System/Volumes/Data/Applications/Transporter.app/" | |
| ======================================================================== |
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
| <?php | |
| function read_dotenv(string $filePath) { | |
| $envs = parse_ini_file($filePath); | |
| foreach ($envs as $k => $v) { | |
| $k = strtoupper($k); | |
| putenv("$k=$v"); | |
| $_ENV[$k] = $_SERVER[$k] = $v; | |
| } |