Skip to content

Instantly share code, notes, and snippets.

View sandrock's full-sized avatar
💭
😪 migrating lots of stuff to dotnet core

SandRock sandrock

💭
😪 migrating lots of stuff to dotnet core
View GitHub Profile
@sandrock
sandrock / Extensions.InvariantString.cs
Last active October 1, 2022 15:59
C# Returns an invariant, roundtrip-safe string representation numeric values
namespace System
{
using System.Globalization;
// source: https://gist.github.com/sandrock/6fe3298b8ac6d9d0d9872dd811a63908
/// <summary>
/// Extension methods for common types that provide ToInvariantString() capability.
/// </summary>
{
"Africa/Abidjan": "+00:00",
"Africa/Accra": "+00:00",
"Africa/Addis_Ababa": "+03:00",
"Africa/Algiers": "+01:00",
"Africa/Asmara": "+03:00",
"Africa/Asmera": "+03:00",
"Africa/Bamako": "+00:00",
"Africa/Bangui": "+01:00",
"Africa/Banjul": "+00:00",
anonymous
anonymous / SliderValueChangedBehavior : Behavior<Slider>
Created December 18, 2012 09:08
Helps find the user-selected value of a slider only when the keyboard/mouse gesture has ended.
namespace WpfApplication1.Behaviors
{
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Interactivity;
/// <summary>
/// Helps find the user-selected value of a slider only when the keyboard/mouse gesture has ended.
@dotnetchris
dotnetchris / gist:3636052
Created September 5, 2012 12:47
Simple ravendb backup script
$dest = "F:\Backup\Runs\backup-"+(Get-Date).ToString("yyyy-MM-dd HHmm")
.\Raven.Backup.exe --url=http://localhost/ --dest=$dest
& 'C:\Program Files\7-Zip\7z.exe' a $dest $dest
Remove-Item -Recurse $dest