Skip to content

Instantly share code, notes, and snippets.

View olexale's full-sized avatar

Oleksandr Leushchenko olexale

View GitHub Profile
olexale / modified_son_of_obsidian.json
Last active August 29, 2015 14:10
"Son Of Obsidian" theme for Xamarin Studio
View modified_son_of_obsidian.json
"name":"Son Of Obsidian",
"originator":"Imported from /Users/ole/Library/XamarinStudio-4.0/HighlightingSchemes/son-of-obsidian.vssettings",
{"name": "Fold Cross", "color":"#A29191", "secondcolor":"#E2E2E2" } ],
{"name": "Selected Text", "fore":"#FFFFFF", "back":"#43686C" },
{"name": "Selected Text(Inactive)", "back":"#385A5E" }
olexale / gist:e4ed077acfd396605ac1
Created December 11, 2014 09:34
MvvmCross snippets for Xamarin Studio
View gist:e4ed077acfd396605ac1
Shortcut: cmvx
Group: C#
Description: ICommand
Mime: text/x-csharp
Template text:
ICommand _$myCommand$;
olexale /
Created December 13, 2014 08:34
Android screenshot script
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png
olexale / cmvx.snippet
Created October 28, 2013 13:44
MvvmCross snippets for Visual Studio
View cmvx.snippet
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0">
<Title>MvvmCross command</Title>
<Description>Code snippet for MvvmCross command</Description>
View CounterState.cs
class CounterState
public CounterState(int count) { Count = count; }
public int Count { get; }
View actions.cs
class IncrementAction { }
class DecrementAction { }
View CounterReducer.cs
class CounterReducer
public CounterState Reduce(CounterState state, object action)
switch (action)
case IncrementAction i:
return ProcessIncrement(state);
case DecrementAction d:
return ProcessDecrement(state);
View CounterStore.cs
class CounterStore : INotifyPropertyChanged
private readonly CounterReducer reducer = new CounterReducer();
private CounterState state;
public CounterStore(CounterState initialState)
state = initialState;
View TransitionAnimator.cs
public class TransitionAnimator : UIViewControllerAnimatedTransitioning
private const double _duration = 0.5;
public override void AnimateTransition(IUIViewControllerContextTransitioning transitionContext)
var containerView = transitionContext.ContainerView;
var toView = transitionContext.GetViewFor(UITransitionContext.ToViewKey);
View AnimationNavigationControllerDelegate.cs
public class AnimationNavigationControllerDelegate : UINavigationControllerDelegate
private TransitionAnimator _animator = new TransitionAnimator();
public override IUIViewControllerAnimatedTransitioning GetAnimationControllerForOperation(UINavigationController navigationController, UINavigationControllerOperation operation, UIViewController fromViewController, UIViewController toViewController)
return _animator;