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
| [<AutoOpen>] | |
| module Tirax.KMS.AdaptiveExtension | |
| open System | |
| open System.Runtime.CompilerServices | |
| open FSharp.Data.Adaptive | |
| [<Struct; IsReadOnly>] | |
| type AsyncResult<'T> = | |
| | Loading |
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
| function New-IsoFile | |
| { | |
| <# .Synopsis Creates a new .iso file .Description The New-IsoFile cmdlet creates a new .iso file containing content from chosen folders .Example New-IsoFile "c:\tools","c:Downloads\utils" This command creates a .iso file in $env:temp folder (default location) that contains c:\tools and c:\downloads\utils folders. The folders themselves are included at the root of the .iso image. .Example New-IsoFile -FromClipboard -Verbose Before running this command, select and copy (Ctrl-C) files/folders in Explorer first. .Example dir c:\WinPE | New-IsoFile -Path c:\temp\WinPE.iso -BootFile "${env:ProgramFiles(x86)}\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\efisys.bin" -Media DVDPLUSR -Title "WinPE" This command creates a bootable .iso file containing the content from c:\WinPE folder, but the folder itself isn't included. Boot file etfsboot.com can be found in Windows ADK. Refer to IMAPI_MEDIA_PHYSICAL_TYPE enumeration for possible media types: http://msdn.mi |
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
| [package] | |
| name = "io_monad_guessing_game" | |
| version = "0.1.0" | |
| authors = ["Ruxo Zheng <[email protected]>"] | |
| edition = "2021" | |
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
| [dependencies] | |
| anyhow = "1" |
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 LanguageExt; | |
| using LanguageExt.Common; | |
| using NetConsole = System.Console; | |
| // ReSharper disable InconsistentNaming | |
| namespace TestConsole; | |
| public delegate Either<Error, A> IO<in Env, A>(Env env); | |
| interface ConsoleIO |
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
| use std::ffi::c_void; | |
| // Create a wrapper structure to erase FnMut type from manipulation. | |
| struct MutWrapper<'h> { | |
| f: Box<dyn FnMut() -> () + 'h>, | |
| } | |
| impl<'h> MutWrapper<'h> { | |
| fn new<F>(handler: F) -> Self where F: FnMut() + Send + 'h { | |
| let f = Box::new(handler); |
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
| use std::pin::Pin; | |
| use std::ptr::null; | |
| use std::sync::Arc; | |
| #[derive(Clone)] | |
| struct Test { | |
| data: Pin<Arc<[u8; 8]>>, | |
| reference: *const [u8; 8] | |
| } | |
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
| [package] | |
| name = "r4w" | |
| version = "0.1.0" | |
| edition = "2021" | |
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
| [dependencies] | |
| [dependencies.windows] |
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
| use std::io::{stdin, Error}; | |
| /// Write text output into STDOUT with string format supported. Like .NET `Console.Write()` | |
| #[macro_export] | |
| macro_rules! console_write { | |
| ($($args: tt)*) => {{ | |
| print!($($args)*); | |
| std::io::Write::flush(&mut std::io::stdout())?; | |
| }}; | |
| } |
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.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Runtime.InteropServices; | |
| namespace DesktopWallpaper | |
| { | |
| [StructLayout(LayoutKind.Sequential)] |
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 psi = new ProcessStartInfo | |
| { | |
| FileName = "mongo", | |
| Arguments = $"{tlsSupport} --quiet --eval \"{query}\"", | |
| CreateNoWindow = true, | |
| RedirectStandardOutput = true | |
| }; | |
| var procQuery = new Process | |
| { |