Skip to content

Instantly share code, notes, and snippets.

View monoman's full-sized avatar

Rafael Teixeira monoman

View GitHub Profile
monoman / UberQueue.cs
Created August 16, 2021 21:34
My Take on David Fowler UberQueue Challenge
// See for more information
using System.Collections;
using System.Collections.Generic;
Console.WriteLine("Hello, UberQueue!");
var uq = new UberCollections.UberQueue<string>(
new TestAsyncQueue(delay: 500, "One", "Two", "Three"),
new TestAsyncQueue(delay: 1000, "Four", "Five"),
new TestAsyncQueue(delay: 150, "Six", "Seven", "Eight", "Nine")
monoman /
Last active December 28, 2020 22:15
Trying to add a Document file to a chain through the IL2 Node’s REST API

FAQ - Document Registry on REST [DEPRECATED]


Trying to add a Document file to a chain through the IL2 Node’s REST API


1 - Where should the document content be posted to?

The body content of the POST is the file content (as native unencoded bytes) and it should be posted to the URL built from the query parameters

Partial request path: /documents@t_HlFTTruR33B6_hsgfpq8bPCaADamwrfQy1stPJTkY?Cipher=None&Name=BlahBlah.txt

static void ConfigureLogger()
const string logConfig = @"<?xml version=""1.0"" encoding=""utf-8"" ?>
<level value=""INFO"" />
<appender-ref ref=""console"" />
<appender name=""console"" type=""log4net.Appender.ColoredConsoleAppender"">
<layout type=""log4net.Layout.PatternLayout"">
monoman / TranslatableStrings_Example.cs
Last active August 29, 2015 14:23
TranslatableStrings aims to enable Roslyn to again be at peace with resources or any other translation mechanism when using string interpolation
var person="David";
Console.WriteLine($_"Hello {person}");
// Prints "Alô David" in pt-BR
Console.WriteLine($"Hello {person}");
// Prints "Hello David" in pt-BR
/* ---- MIT LICENSE ----
Copyright (c) 2011 John Gietzen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
monoman / Thanks to Hao Kung, b_levitt
Created October 27, 2014 16:19
Add to Global.asax.cs and call InitJQuery on Application_Start() to avoid "WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'" on migrating to ASP.NET 4.5
Based on **b_levitt** answer to
But avoiding hardcoding the jQuery version (doesn't play nice with nuget) by using some regex as explained by **Hao Kung** on
monoman / gist:2053145
Created March 16, 2012 22:08
Some things that could make ASP.NET MVC 4 Web API even better
// this offends my coding sensibility
public Contact GetContact(int id)
Contact contact = _repository.Get(id);
if (contact == null)
throw new HttpResponseException(HttpStatusCode.NotFound);
return contact;
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="nuspec"
<xs:element name="package">
monoman / ReadonlyProperties.cs
Last active September 26, 2015 05:48
I would do differently on a light C# example from
public class Person {
public Person(string name, int age) {
_name = name;
_age = age;
private readonly string _name;
private readonly int _age;
/// Full name
public string Name { get _name; }
/// Age in years
monoman / Boo Marvels - 1
Last active September 25, 2015 09:38
Boo's creator answering a question on Boolang list. Another wonder of meta-programming...
Daniel Brauer's Question:
Of course I just figured it out: I was trying to declare a bunch of floats like this:
m_forwardPower = 2f,
m_backwardPower = 1f,
m_strafePower = 0f,
m_maxVelocity = 5f,
m_turnSpeed = 3f,