Skip to content

Instantly share code, notes, and snippets.

@sixeyed
sixeyed / profile.ps1
Created November 1, 2018 11:25
PowerShell profile with a Linux-style prompt and aliases for common Docker commands
function Prompt(){
$W = Split-Path -leaf -path (Get-Location)
$prompt = Write-Prompt "$($env:UserName)@$($env:ComputerName):" -ForegroundColor Green
$prompt += Write-Prompt $W -ForegroundColor DarkCyan
$prompt += Write-Prompt '>'
return ' '
}
function Remove-StoppedContainers {
docker container rm $(docker container ls -q)
@alimbada
alimbada / gist:3083937
Created July 10, 2012 15:11
Metro Style for WPF Button
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style
x:Key="ButtonFocusVisual">
<Setter
Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2" />
</ControlTemplate>
@joergbattermann
joergbattermann / gist:1717049
Created February 1, 2012 14:00
Open TFS WorkItem within a running Visual Studio instance
private static DocumentService _workItemDocumentService;
private static void OpenWorkItem(TeamFoundationServer tfsServer, int workItemId)
{
if(_workItemDocumentService == null)
_workItemDocumentService = (DocumentService)DTE2.DTE.GetObject("Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.DocumentService");
// you can also use _workItemDocumentService = (DocumentService)Package.GetGlobalService(typeof(DocumentService));
IWorkItemDocument workItemDocument = workItemDocumentService.GetWorkItem(activeTFS, workItemId, this);