This file contains 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
git for-each-ref --format '%(refname:short)' refs/heads/ | grep -v master | xargs git branch -d |
This file contains 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 DateTimeExtensions { | |
#region Day | |
public static DateTime StartOfDay(this DateTime d) { | |
return d.Date; | |
} | |
public static DateTime EndOfDay(this DateTime d) { | |
return new DateTime(d.Year, d.Month, d.Day, 23, 59, 59); | |
} |
This file contains 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
/// <summary> | |
/// A simple implementation of CollectionView / CollectionViewSource | |
/// for portable class libraries. | |
/// </summary> | |
/// <remarks> | |
/// Unfortunately due some Windows 8 oddness, we had to resort to using | |
/// an <see cref="ObservableCollection{T}"/> as the view. Probably something | |
/// to do with ObservableMap but ItemsControls and the inherited versions | |
/// don't subscribe to the <see cref="INotifyCollectionChanged.CollectionChanged"/> | |
/// event. |
This file contains 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
/// <summary> | |
/// Things <see cref="DbModelBuilder"/> is missing or could be more succinct. | |
/// </summary> | |
public static class DbModelBuilderExtensions { | |
/// <summary> | |
/// Configures the primary key property for this entity type. | |
/// </summary> | |
/// <typeparam name="TEntityType"></typeparam> | |
/// <typeparam name="TKey">The type of the key.</typeparam> | |
/// <param name="keyExpression">A lambda expression representing the property to be configured.</param> |
This file contains 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
/** | |
* defaults.less | |
*/ | |
div.my-class-name { | |
padding: 15px; | |
form { | |
padding: 10px; | |
} |
This file contains 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
/// <summary> | |
/// Defines an interface which upgrades | |
/// the application from a version which is great | |
/// or equal to <see cref="IUpgrade.FromVersion"/> | |
/// and before <see cref="IUpgrade.ToVersion"/>. | |
/// </summary> | |
public interface IUpgrade { | |
Version FromVersion { get; } | |
Version ToVersion { get; } |
This file contains 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
/// <summary> | |
/// A list view which expands to fit | |
/// it's content rather than scrolling. | |
/// </summary> | |
public class ExpandingMvxListView : MvxListView { | |
public ExpandingMvxListView(Context context, IAttributeSet attrs) : base(context, attrs) {} | |
public ExpandingMvxListView(Context context, IAttributeSet attrs, IMvxAdapter adapter) : base(context, attrs, adapter) { } | |
protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec) { | |
// Calculate entire height by providing a very large height hint. |
This file contains 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
/// <summary> | |
/// An attribute used to dynamically | |
/// call RaisePropertyChanged for the applied | |
/// property when the dependent property is changed. | |
/// </summary> | |
[AttributeUsage(AttributeTargets.Property)] | |
public class DependsOnAttribute : Attribute { | |
public IEnumerable<string> DependentPropertyNames { get; private set; } | |
public DependsOnAttribute(params string[] dependentPropertyNames) { |
This file contains 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
.cm-s-tomorrow-night-eighties.CodeMirror { background: #2d2d2d; color: #cccccc; } | |
.cm-s-tomorrow-night-eighties .CodeMirror-selected { background: #515151 !important; } | |
.cm-s-tomorrow-night-eighties .CodeMirror-gutters { background: #2d2d2d; border-right: 0; } | |
.cm-s-tomorrow-night-eighties .CodeMirror-linenumber { color: #7C7C7C; } | |
.cm-s-tomorrow-night-eighties .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; } | |
.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { border-bottom: 1px solid #999999; color: #cccccc !important; } | |
.cm-s-tomorrow-night-eighties .CodeMirror-nonmatchingbracket { color: red !important; } | |
.cm-s-tomorrow-night-eighties .cm-keyword { color: #cc99cc; } | |
.cm-s-tomorrow-night-eighties .cm-atom { color: #f99157; } |
This file contains 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 class YourPlatformSpecificPresenter : PlatformSpecificMvxPresenter, IMvxViewPresenterWithDelegate { | |
public MvxViewPresenterDelegate Delegate { get; } = new MvxViewPresenterDelegate(); | |
public YourPlatformSpecificPresenter() { | |
this.AddPresentationHintHandler<MyPresentationHint>(hint => { | |
// Do something | |
}); | |
} | |
public override void ChangePresentation(MvxPresentationHint hint) { |
NewerOlder