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
#!/bin/bash | |
# Installs latest release of hub on Linux | |
# Echo, halt on errors, halt on uninitialized ENV variables. (https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/) | |
set -euxo pipefail | |
# Hub doesn't have a way to install the latest version using `apt` yet, so I wrote this as a hacky substitute. | |
# This will be unnecessary when this issue is resolved: https://github.com/github/hub/issues/718#issuecomment-65824284 | |
# Linux options include: |
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 ObservableCollectionExtensions | |
{ | |
public static IDisposable SuppressCollectionEvents(this INotifyCollectionChanged collection, | |
bool fireEventWhenComplete = true) | |
{ | |
return new CollectionEventSuppressor(collection, fireEventWhenComplete); | |
} | |
private class CollectionEventSuppressor : IDisposable | |
{ |