Description will be added later
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
## This script adds parallax functionality to any Node2D. | |
## But be careful, some Node2D descendants may work in a special way | |
## with the position and global_position properties, | |
## or have other conflicts with the logic of this script.[br] | |
## | |
## [b]How to use[/b]: Add this script to any [Node2D], | |
## such as [TileMapLayer] or [Sprite2D], or to [Node2D] itself. | |
## Or move the main sections of the code to your own script.[br] | |
## After that, this node will have new properties that allow you | |
## to configure parallax and see it working in the editor just like in the game.[br] |
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
# Usage: | |
# | |
# Call it without any args except path to file to save credential. | |
# The script will show a window for entering credentials and save them to a file in encrypted form. | |
# > powershell -File run_as_with_saved_creds.ps1 creds.txt | |
# | |
# Call it with arguments after path to file with saved credential. | |
# The script will execute the command as the user whose credentials have been saved in the file. | |
# > powershell -File run_as_with_saved_creds.ps1 creds.txt some commands and 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
public interface IOption<T> : IEnumerable<T> | |
{ | |
bool IsSome { get; } | |
T Value { get; } | |
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); | |
} | |
public static class Option | |
{ | |
public static IOption<T> Some<T>(T value) => new Some<T>(value); |
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
public static class Building | |
{ | |
public static Func<T> Provide<T>(Func<T> provider) => provider; | |
public static Func<T> Provide<T>(T value) => () => value; | |
public static Func<T> With<T>(this Func<T> provider, Action<T> modifier) => | |
With(provider, modifier, out _); | |
public static Func<T> With<T>(this Func<T> provider, Action<T> modifier, out Func<T> thisStep) | |
{ |