Skip to content

Instantly share code, notes, and snippets.

View Aimeast's full-sized avatar
🙃
There is no typing

Aimeast

🙃
There is no typing
View GitHub Profile
@Aimeast
Aimeast / Inlining.cs
Last active February 21, 2017 17:04
Test C# inlining method (framework 4.5)
/*
* Following code for test an method will be inlined by JIT or not
* Tested on Framework 4.5, Win8 x64
*
* http://blogs.msdn.com/b/ericgu/archive/2004/01/29/64717.aspx
* http://blogs.microsoft.co.il/blogs/sasha/archive/2012/01/20/aggressive-inlining-in-the-clr-4-5-jit.aspx
*/
using System;
using System.Diagnostics;
public static class CommitLogExtension
{
public static IEnumerable<Commit> PathFilter(this IEnumerable<Commit> log, string path)
{
if (string.IsNullOrEmpty(path))
return log;
return log.Where(s =>
{
var pathEntry = s[path];
@Aimeast
Aimeast / Generator.cs
Last active December 19, 2015 17:28
Encoding bin files generator
// Encoding bin files generator for Encoding for Silverlight project
// https://encoding4silverlight.codeplex.com/
using System.IO;
using System.Linq;
using System.Text;
class Program
{
private const char LEAD_BYTE_CHAR = '\uFFFE';
@Aimeast
Aimeast / LockThis.vbs
Created April 5, 2013 15:27
Click this VBscript in a BitLocker drive to lock it quicker.
' =====================================================================
' Version: 1.0
' Date: 2013-02-22
' Description:
' This script is for auto lock a unlocked BitLocker drive.
' Put this script in a BitLocker drive and run it to lock this drive.
' =====================================================================
On Error Resume Next