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
module Jekyll | |
require 'coffee-script' | |
class CoffeeScriptConverter < Converter | |
safe true | |
priority :normal | |
def matches(ext) | |
ext =~ /coffee/i | |
end |
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
using System; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
using System.Windows; | |
using System.Windows.Controls.Primitives; | |
using System.Windows.Input; | |
using System.Windows.Interop; | |
/// <summary> | |
/// Popup with code to not be the topmost control |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<!-- for ne metro style --> | |
<Style TargetType="{x:Type DataGridColumnHeadersPresenter}"> | |
<Setter Property="Template"> | |
<Setter.Value> | |
<ControlTemplate TargetType="DataGridColumnHeadersPresenter"> | |
<Grid> | |
<Border IsHitTestVisible="False" | |
BorderThickness="0 0 0 3" | |
Background="Transparent" | |
BorderBrush="{DynamicResource GrayBrush5}" /> |
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
/* | |
* Provides DWM Color as a Bindable Property | |
* Add the Namespace | |
* xmlns:dwmAero="clr-namespace:MahApps.Metro.DWMAero" | |
* And a Resource | |
* <dwmAero:AeroColorProvider x:Key="AeroColorProvider" /> | |
* Then Bind on the Properties (110%,95%,80%,65%,50% Respectively) | |
* Color="{Binding Source={StaticResource AeroColorProvider}, Path=Highlight}" | |
* Color="{Binding Source={StaticResource AeroColorProvider}, Path=Accent}" | |
* Color="{Binding Source={StaticResource AeroColorProvider}, Path=Accent2}" |
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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:Controls="clr-namespace:MahApps.Metro.Controls" | |
xmlns:Behaviours="clr-namespace:MahApps.Metro.Behaviours" | |
xmlns:Converters="clr-namespace:MahApps.Metro.Converters"> | |
<Converters:ThicknessBindingConverter x:Key="ThicknessBindingConverter" /> | |
<Style x:Key="ExpanderBaseHeaderStyle" TargetType="{x:Type ToggleButton}"> | |
<Setter Property="Background" Value="Transparent" /> |
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
<UniformGrid Columns="4" Rows="3" Grid.Row="0" RenderOptions.ClearTypeHint="Enabled" TextOptions.TextRenderingMode="ClearType"> | |
<Grid HorizontalAlignment="Center" VerticalAlignment="Center"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="*" /> | |
</Grid.RowDefinitions> | |
<TextBlock Text="Flip.Normal" | |
Margin="4" | |
FontSize="14" |
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
Intellisense could not be initialized due to the following error: System.ArgumentException: Empty path name is not legal. | |
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) | |
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) | |
at Microsoft.VisualStudio.Text.Implementation.TextDocumentFactoryService.OpenFileGuts(String filePath, DateTime& lastModifiedTimeUtc, Int64& fileSize) | |
at Microsoft.VisualStudio.Text.Implementation.TextDocumentFactoryService.OpenFile(String filePath, DateTime& lastModifiedTimeUtc, Int64& fileSize) | |
at Microsoft.VisualStudio.Text.Implementation.TextDocumentFactoryService.CreateAndLoadTextDocument(String filePath, IContentType contentType, Boolean attemptUtf8Detection, Boolean& characterSubstitutionsOccurred) | |
at Micro |
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
private int GetPasswordBoxCaretPostion(PasswordBox passwordBox) | |
{ | |
var infos = passwordBox?.GetType()?.GetProperty("Selection", BindingFlags.NonPublic | BindingFlags.Instance); | |
var selection = infos?.GetValue(passwordBox, null) as TextSelection; | |
var tTextRange = selection?.GetType()?.GetInterfaces()?.Where(x => x.Name == "ITextRange")?.FirstOrDefault(); | |
var oStart = tTextRange?.GetProperty("Start")?.GetGetMethod()?.Invoke(selection, null); | |
var value = oStart?.GetType()?.GetProperty("Offset", BindingFlags.NonPublic | BindingFlags.Instance)?.GetValue(oStart, null) as int?; | |
var caretPosition = value.GetValueOrDefault(0); | |
return caretPosition; | |
} |
OlderNewer