Skip to content

Instantly share code, notes, and snippets.

View ArturKarbone's full-sized avatar

Artur Karbone ArturKarbone

View GitHub Profile
@ArturKarbone
ArturKarbone / README.MD
Last active October 1, 2022 17:51
Warehouse API

Warehouse API

Warehouse API is a nice and sexy service for working with Naburszh Warehouse.

API

API is exposed through the following endpoint –

http://warehouse-api.azurewebsites.net/api

The endpoint is protected by the authentication token. The token must be provided via x-client-id header

public class Program
{
//Not Awaited
//public static void Main(string[] args) => AsyncMain(args);
//Awaited #1
//public static void Main(string[] args) => AsyncMain(args).GetAwaiter().GetResult();
//Awaited #2
public static void Main(string[] args) => AsyncMain(args).Wait();
@ArturKarbone
ArturKarbone / CI.functions.ps1
Last active October 3, 2016 10:51
Simple .NET Core CI pipeline
function CleanUpArtifactsDirectory
{
if(Test-Path .\.artifacts) {
echo "build: Cleaning .\.artifacts"
Remove-Item .\.artifacts -Force -Recurse
}
}
function RestoreSolutionPackages
class Program
{
public class Person
{
public ObjectId Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
public class MongoFirstConcept
@ArturKarbone
ArturKarbone / gist:93abb6b2960fb161eaea
Created September 18, 2015 16:08
Migradoc checkbox
public static class MigradocExtensions
{
public static void AddCheckbox(this Paragraph paragraph, bool value)
{
//paragraph.AddFormattedText("\u00fe", new Font("Wingdings"));
//paragraph.AddFormattedText("\u00fd", new Font("Wingdings"));
//paragraph.AddFormattedText("\u00fc", new Font("Wingdings"));
paragraph.AddFormattedText(value ? "\u00fe" : "\u00A8", new Font("Wingdings"));
@ArturKarbone
ArturKarbone / gist:feb15bde965b8247cefd
Last active August 29, 2015 14:10
F# expressive factorial
let a func = func
let from value = value
let rec factorial n =
match n with
| 0 | 1 -> 1
| _ -> n * factorial(n-1)
a factorial (from 4)