Skip to content

Instantly share code, notes, and snippets.

View adbre's full-sized avatar

Adam Brengesjö adbre

  • Sweden, Kungälv
View GitHub Profile
@adbre
adbre / A.md
Last active May 14, 2018 07:58

100 000 records

Creating test data (100000 records)... DONE
    Elapsed....: 00:00:00.0340276
    # per µs...: 2,94
    µs per #...: 0,34

Creating subset (1000 records... DONE
    Elapsed....: 00:00:00.0003953

per µs...: 2,53

@adbre
adbre / WeirdSyntax.cs
Last active August 23, 2017 09:28 — forked from jonwarghed/WeirdSyntax.cs
What is this C# syntax called?
namespace Trine.CLI
{
class Program
{
static void Main()
{
new Crash
{
Inner = {Name = "what"}
};
using System;
using System.Threading;
namespace Example
{
public static class ThreadPond
{
public static void QueueUserWorkItem<T1>(Action<T1> callback, T1 arg1)
{
if (callback == null) throw new ArgumentNullException(nameof(callback));
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
namespace TestPad
{
public class Tests
{
[Test]
using System;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Xml.Serialization;
using Newtonsoft.Json;
using NUnit.Framework;
namespace Lab
{
using System.IO;
namespace System.Reflection
{
public static class AssemblyManifestResourceStreamExtensions
{
public static Stream OpenManifestResourceStream(this Assembly assembly, string name)
{
if (assembly == null) throw new ArgumentNullException("assembly");
var result = assembly.GetManifestResourceStream(name);
@adbre
adbre / README.md
Created November 11, 2013 15:28
ResolveBuilder for TinyIoC
var container = new TinyIoCContainer();
container.Register<ICar, ChittyBangBang>();
container.Register<ICar, Herbie>("Beetle");

var actual = container
  .ResolveBuilder()
  .WithOverload<ICar>("car", "Beetle")

.Resolve();

@adbre
adbre / MicroIoContainer.cs
Last active December 21, 2015 08:38
Micro Inversion of Control Container
using System;
using System.Collections.Generic;
using System.Linq;
namespace MicroIoC
{
public interface IMicroIoContainer
{
object Resolve(Type type);
T Resolve<T>(Type type) where T : class;
#!/bin/bash
alias which='type -a'
alias ..='cd ..'
alias dev='cd /c/dev/'
alias path='echo -e ${PATH//:/\\n}'
alias ls='ls -hF --color' # add colors for filetype recognition
alias la='ls -Al' # show hidden files
alias lx='ls -lXB' # sort by extension
# If you use MyGet.org at your company, this script can be modified and distributed to help your
# developers set up MyGet.org access.
$feedUrl = "https://www.myget.org/F/CHANGEME/"
$feedName = "ChangeMe"
$nuget = Read-Host "Enter path to NuGet.exe"
echo ""
echo "You need your API Key. It can be obtained from MyGet.org"