Skip to content

Instantly share code, notes, and snippets.

View Stephanvs's full-sized avatar

Stephan van Stekelenburg Stephanvs

View GitHub Profile
@Stephanvs
Stephanvs / Home.xml
Last active August 29, 2015 14:07 — forked from Cheesebaron/Home.xml
A couple of code snippets for a blog post about Fragments, ViewPager and MvvmCross.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<dk.ostebaronen.droid.viewpagerindicator.TitlePageIndicator
android:id="@+id/viewPagerIndicator"
android:padding="10dip"
@Stephanvs
Stephanvs / Home.xml
Last active August 29, 2015 14:07 — forked from Cheesebaron/Home.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<dk.ostebaronen.droid.viewpagerindicator.TitlePageIndicator
android:id="@+id/viewPagerIndicator"
android:padding="10dip"
<Grid x:Name="LayoutRoot" Width="37" Height="42" Visibility="Collapsed" Opacity="0">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
<VisualState x:Name="DefaultState">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Visibility"
BeginTime="0:0:0.2">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed"/>
</ObjectAnimationUsingKeyFrames>
<DoubleAnimation Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"
Set-Location $env:userprofile\Source
# Load posh-git example profile
. 'C:\tools\poshgit\dahlbyk-posh-git-c481e5b\profile.example.ps1'
function Set-VsCmd
{
param(
[parameter(Mandatory, HelpMessage="Enter VS version as 2010, 2012, or 2013")]
@Stephanvs
Stephanvs / install.wbox
Last active January 1, 2016 20:59
Boxstarter DevVM
Update-ExecutionPolicy Unrestricted
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Disable-InternetExplorerESC
cinst GoogleChrome
cinst adblockpluschrome
cinst VisualStudio2013Ultimate
@Stephanvs
Stephanvs / View.xaml
Created September 15, 2013 09:20
Windows Phone DataContext Declaration in XAML
<phone:PhoneApplicationPage.DataContext>
<local:MyViewModel/>
</phone:PhoneApplicationPage.DataContext>
@Stephanvs
Stephanvs / Model.cs
Created September 15, 2013 09:16
Windows Phone 8 LongListSelector Found at: http://codepaste.net/2xycf8
public class Parent
{
public int Id { get; set; }
public string Name { get; set; }
public List<Child> Children { get; set; }
}
public class Child
{
public int Id { get; set; }
@Stephanvs
Stephanvs / Usage.xaml
Created August 27, 2013 06:54
PubCenter Ad Provider for Unified Ad Control for Windows Phone 8
<UserControl x:Class="sabnzbdplus.Views.UnifiedAdControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ads="clr-namespace:MC.Phone.Ads;assembly=MC.Phone.Ads"
xmlns:adDuplex="clr-namespace:MC.Phone.Ads.AdDuplex;assembly=MC.Phone.Ads.AdDuplex"
xmlns:adMob="clr-namespace:MC.Phone.Ads.AdMob;assembly=MC.Phone.Ads.AdMob"
xmlns:ads1="clr-namespace:your.namespace.Ads">
<Grid>
<ads:AdControl x:Name="AdControl"
namespace BenjiiMe.Animation
{
public class ContinuumTransition : TransitionElement
{
public const string ContinuumElementPropertyName = "ContinuumElement";
public const string ContinuumModePropertyName = "Mode";
public FrameworkElement ContinuumElement
{
get { return (FrameworkElement)GetValue(ContinuumElementProperty); }
@Stephanvs
Stephanvs / gist:6155132
Created August 5, 2013 11:07
p4merge on Windows
[merge]
keepBackup = false;
tool = p4merge
[mergetool "p4merge"]
cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
keepTemporaries = false
trustExitCode = false
keepBackup = false