Skip to content

Instantly share code, notes, and snippets.

View devlead's full-sized avatar

Mattias Karlsson devlead

View GitHub Profile
@mrange
mrange / 2d_performance.md
Last active January 30, 2017 16:26
On the topic of 2D array performance in .NET

On the topic of 2D array performance in .NET

Full source code can be found here

It popped up a discussion in FSSF Slack over 2D arrays and performance. I thought it could be good to share some performance numbers for different alternatives in .NET.

For this I am computing the matrix product:

let naiveMultiply () =
@mrange
mrange / lazy_performance.md
Last active June 11, 2020 21:21
On the cost of being lazy

On the cost of being lazy

Full source code can be found here

Changelog

  1. 2017-01-04
  2. New performance test - Paul Westcott (@manofstick) provided his implementation of Lazy semantics (called Lazzzy) which I included in the graphs. This implementation is intended to be equivalent to Lazy<'T> in .NET with regards to functionality.
  3. 2017-01-17
  4. New performance test - is working on a PR for .NET Core. I wanted to include performance numbers for the updated Lazy<'T> class.
@sayedihashimi
sayedihashimi / libgit2sharp.snippet.proj
Last active August 29, 2015 14:12
How to include libgit2sharp NativeBinaries in the generated .vsix for a VSIX or Visual Studio Package
<!--
MSBuild snippet which you can paste into your .csproj/.vbproj for a VSIX or Visual Studio Package project
to have the libgit2sharp NativeBinaries .dlls included in the final .vsix.
Modified version of http://chrisparnin.github.io/articles/2013/09/deploying-native-binaries-with-visual-studio-extensions/
-->
<PropertyGroup>
<EnableIncludeLibGit2SharpInVsix Condition=" '$(EnableIncludeLibGit2SharpInVsix)'=='' ">true</EnableIncludeLibGit2SharpInVsix>
</PropertyGroup>
<ItemGroup Condition=" '$(EnableIncludeLibGit2SharpInVsix)'=='true' ">
@snikch
snikch / gist:2245975
Created March 30, 2012 02:38
Hacking a PL2303 LED Badge in Mac OS (Code Mania attendee badge)
1) Install the PL2303 Lion driver from http://changux.co/osx-installer-to-pl2303-serial-usb-on-osx-lio
2) Install the CrossOver trial http://www.codeweavers.com/products/cxmac/
3) Install the 'LED Mini Board' software as a CrossOver app http://www.prolific.com.tw/eng/downloads.asp?id=31
4) Plug in your device, then symlink the mounted device in /dev to the `dosdevices` folder in your CrossOver app
cd ~/Library/Application\ Support/CrossOver/Bottles/Setup.exe/dosdevices # Where Setup.exe is the CrossOver app that was created
ln -s /dev/cu.PL2303-00001004 com1 # Your /dev/ mount name may be slightly different