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
| <# | |
| .SYNOPSIS | |
| Archives all Bitwarden vault items in a given folder using the bw CLI. | |
| .DESCRIPTION | |
| Unlocks the Bitwarden vault (or reuses an existing session), syncs, finds the | |
| specified folder, and archives every item in it that isn't already archived. | |
| Requires bw CLI 2026.6.0+ (bw archive item <id>) and a Premium account | |
| (Archive is a Premium feature). |
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
| ##Allows using mdi icons in esphome configs without having to look up the unicode value | |
| ##Uses the substitution engine to substitute the icon with the unicode. This means it is limited to a valid substitution format | |
| ##So instead of the home assistant mdi: way, icons are prefixed with mdi_. Slashes are also not allowed, so those are replaced with underscores as well. | |
| mdi_ab_testing: "\U000F01C9" | |
| mdi_abacus: "\U000F16E0" | |
| mdi_abjad_arabic: "\U000F1328" | |
| mdi_abjad_hebrew: "\U000F1329" | |
| mdi_abugida_devanagari: "\U000F132A" | |
| mdi_abugida_thai: "\U000F132B" |
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 ExpressionExtensions | |
| { | |
| /// <summary> | |
| /// Converts a lambda property getter expression to a property setter delegate. | |
| /// For example: "o => o.MyProperty" to "o => o.MyProperty = newValue" | |
| /// </summary> | |
| public static Action<TProperty> ConvertGetterToSetter<TObject, TProperty>(this Expression<Func<TObject, TProperty>> expression, TObject o) { | |
| var property = ((MemberExpression)expression.Body).Member as PropertyInfo; | |
| Guard.Against(property == null, "Expression is not a property getter"); |
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
| Notes based on Greg Young's business perspective presentation | |
| http://skillsmatter.com/podcast/agile-testing/greg-young-cqrs-event-sourcing-the-business-perspective | |
| With a standard structural model we make assumptions of what the business may or may not want in the future. How can we presume to know what to track and what to discard. | |
| CQRS/ES benefits: | |
| * Captures behaviour explicitly, events carry the intent of users. | |
| * We can derive any possible model about data that may be required. | |
| * Allows domain experts and users to look at today in any way they may want to. |
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
| // NOTE: ripped from https://github.com/caelum/restfulie/wiki/csharp_short_samples | |
| //retrieves the resource through GET: the entry point | |
| dynamic order = Restfulie.At(resourceURI).Get(); | |
| Console.WriteLine("the order price is " + order.Price); | |
| Console.WriteLine("The order product is" + order.Product); | |
| // Executing a state transition: | |
| order.Pay(); |