Skip to content

Instantly share code, notes, and snippets.

Avatar

Shmueli Englard SamuelEnglard

View GitHub Profile
@SamuelEnglard
SamuelEnglard / userscript.js
Last active Sep 20, 2017
Redirect MDSN pages to Docs
View userscript.js
// ==UserScript==
// @name MSDN to Docs
// @namespace https://gist.github.com/SamuelEnglard/d9c1fde967236c1dba4a8de08e203288
// @version 0.2
// @description Redirect MDSN pages to Docs
// @author Shmuelie
// @match https://msdn.microsoft.com/*
// @grant none
// ==/UserScript==
@SamuelEnglard
SamuelEnglard / Program.cs
Created Jul 9, 2017
Crazy Base 64 processing
View Program.cs
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using BenchmarkDotNet.Attributes;
namespace Bencharking
{
class Program
{
View Get-OneDriveFolder.psm1
function Get-OneDriveFolder
{
<#
.Synopsis
Gets the current user's OneDrive folder.
.Description
Gets the current user's OneDrive folder.
.Example
View keybase.md

Keybase proof

I hereby claim:

  • I am SamuelEnglard on github.
  • I am shmuelie (https://keybase.io/shmuelie) on keybase.
  • I have a public key whose fingerprint is 5E6F 469D 9CFA 4573 CDAB 7422 4805 122F E963 542E

To claim this, I am signing this object:

@SamuelEnglard
SamuelEnglard / idea.cs
Created May 3, 2017
No Statemachine Disposing
View idea.cs
public Task WriteAsync(Stream stream, byte[] data)
{
Task t = stream.WriteAsync(data, 0, data.Length);
t.ConfigureAwait(false);
return t.ContinueWith((task, disposable) => ((IDisposable)disposable.Dispose(), stream);
}
View SetupSystem.ps1
Set-ExecutionPolicy Bypass; iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
Install-PackageProvider -Name ChocolateyGet -Scope CurrentUser -Force
Import-PackageProvider ChocolateyGet
Install-Package git.portable -Force
Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1"
Install-BinFile -Name git -Path (Join-Path -Path (Get-ToolsLocation) -ChildPath '\git\bin\git.exe')
PowerShellGet\Install-Module posh-git -Scope CurrentUser -Force
Install-Package sysinternals -Force
Install-Package elevate.native -Force
Install-Package obs-studio -Force
@SamuelEnglard
SamuelEnglard / segoemdl22assests.xaml
Created Feb 19, 2017
XAML Resouce Dictionary for Segoe MDL2 Assets
View segoemdl22assests.xaml
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:GitApp">
<x:String x:Key="CheckMarkLegacy">&#xE001;</x:String>
<x:String x:Key="CheckboxFillLegacy">&#xE002;</x:String>
<x:String x:Key="CheckboxLegacy">&#xE003;</x:String>
<x:String x:Key="CheckboxIndeterminateLegacy">&#xE004;</x:String>
<x:String x:Key="CheckboxCompositeReversedLegacy">&#xE005;</x:String>
<x:String x:Key="HeartLegacy">&#xE006;</x:String>
View imageflow.cs
public enum IoMode {
/// None -> 0
None = 0,
/// ReadSequential -> 1
ReadSequential = 1,
/// WriteSequential -> 2
WriteSequential = 2,