Skip to content

Instantly share code, notes, and snippets.

View JanDeDobbeleer's full-sized avatar

Jan De Dobbeleer JanDeDobbeleer

View GitHub Profile
@JanDeDobbeleer
JanDeDobbeleer / post-commit
Created July 18, 2014 19:34
script to copy the working directory from the master after a commit to your cloud storage account to allow automatic backups
#!/bin/sh
# only deploy when on the master
# add this file to .git/hooks in your repo
# add your preferred cloud storage account
dest="Dropbox"
branch=$(git rev-parse --abbrev-ref HEAD)
if [ "master" == "$branch" ]; then
echo "Deploying to $dest"
@JanDeDobbeleer
JanDeDobbeleer / CircularProgressBar.xaml
Created August 28, 2014 11:12
Circular Progress Bar (Silverlight)
<UserControl x:Name="userControl" x:Class="Foo.Bar.CircularProgressBar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
d:DesignHeight="480" d:DesignWidth="480">
@JanDeDobbeleer
JanDeDobbeleer / App.xaml.cs
Created November 10, 2014 12:36
Override default colors in a Windows Phone RT app.
#region custom methods
private void SetupCustomColors()
{
SetColor("ProgressBarIndeterminateForegroundThemeBrush", ((SolidColorBrush)Current.Resources["VikingRed"]).Color);
//SetColor("PivotHeaderForegroundUnselectedBrush", ((SolidColorBrush)Current.Resources["VikingGrey"]).Color);
SetColor("PivotHeaderForegroundSelectedBrush", Colors.White);
}
private void SetColor(string resource, Color color)
{
@JanDeDobbeleer
JanDeDobbeleer / IndexedPath.cs
Last active August 29, 2015 14:09
TwitterMimic extension
using System.Threading;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Shapes;
namespace Gist.Controls
{
public class IndexedPath:Path
{
public static readonly DependencyProperty SelectedColorBrushProperty = DependencyProperty.Register(
@JanDeDobbeleer
JanDeDobbeleer / GithubRelease.ps1
Last active February 6, 2016 19:12
Powershell Github release
function GitHub-Release($versionNumber, $commitId, $preRelease, $releaseNotes, $artifactOutputDirectory, $artifact, $gitHubUsername, $gitHubRepository, $gitHubApiKey)
{
$draft = $TRUE
$releaseData = @{
tag_name = [string]::Format("v{0}", $versionNumber);
target_commitish = $commitId;
name = [string]::Format("v{0}", $versionNumber);
body = $releaseNotes;
draft = $draft;
@JanDeDobbeleer
JanDeDobbeleer / README.md
Last active April 1, 2016 19:24
Dashing - Bamboo Agent Widget

Description

Display a Bamboo Agent status. It can show if it is Offline, Idle or Busy building.

Installation

To use this widget, copy bamboo_agent.html, bamboo_agent.coffee, and bamboo_agent.scss into the /widgets/bamboo_agent directory. Put the bamboo_agent.rb file in your /jobs folder.

You'll also need a nice little icon for the widget. Use whatever you want, name it bamboo-status.png and put it in your /assets/images folder.

#requires -Version 3
function Get-SolutionFolder
{
return (Get-Item $PSScriptRoot).Parent.FullName
}
function Get-SolutionPath
{
param
(
@JanDeDobbeleer
JanDeDobbeleer / phone.runsettings
Created April 6, 2016 10:41
.runsettings file example
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<!-- Configurations that affect the Test Framework -->
<RunConfiguration>
<!-- Path relative to solution directory -->
<ResultsDirectory>.\TestResults</ResultsDirectory>
<!-- [x86] | x64
- You can also change it from menu Test, Test Settings, Default Processor Architecture -->
<TargetPlatform>x86</TargetPlatform>
@JanDeDobbeleer
JanDeDobbeleer / flavors.ps1
Last active April 6, 2016 18:51
psake nested builds template
Task Default -Depends ProductionCI
Task ProductionCI {
Invoke-psake build.ps1 CI -properties @{
# add the properties you need
}
}
Task ProductionCD {
Invoke-psake build.ps1 CD -properties @{
@JanDeDobbeleer
JanDeDobbeleer / psakefile.ps1
Last active April 7, 2016 10:33
psake psakefile - Part II
#requires -Version 3
. '.\psakefile-tools.ps1'
Properties {
$solutionFileName = $null
$build_platform = $null
$configuration = $null
}
Task VerifyBuildProperties {