Skip to content

Instantly share code, notes, and snippets.

View kmorcinek's full-sized avatar

Krzysztof Morcinek kmorcinek

View GitHub Profile
@kmorcinek
kmorcinek / code.cs
Last active December 19, 2015 04:48
public int Add(int a, int b)
{
return a + b;
}
public void Foo()
{
Func<int,int> add5 = x => Add(5, x);
}
@kmorcinek
kmorcinek / bridgeNotes
Created February 24, 2014 16:47
Nauka brydża
Impas - AQ na stoliku, małe na ręce, zagrywamy z ręki.
Ekspas - w dziadku kolor bez, na ręce bez koloru, ale są atu. Chcemy zgarnąć asa od przeciwnika. Gdy on zrzuca to my też. A gdy on asem to my atutem. Wychodzi dziadek.
Trzecia ręka bije i płacze
Lang albo blank (vist w singla)
X bez atu - bez wskazania koloru.
Nie pasuje się do "X bez atu" zazwyczaj.
Gdy popiera w kolorze to uzgadniamy pozostałe. vs Najpierw pokaż inne kolory a potem powtórz uzgadniany.
@kmorcinek
kmorcinek / newEnglishWords
Created February 24, 2014 16:59
Nowe angielskie słówka
moonshine - bimber
@kmorcinek
kmorcinek / quotes
Last active June 5, 2023 18:32
Quotes in json
{"quotes": [
{"content": "NIC NIE MUSISZ, MOŻESZ WSZYSTKO"},
{"content": "Always make new mistakes", author:"Esther Dyson"},
{"content": "Życie jest po to żeby wybrać źle", author:"Mirosław Kępiński"},
{"content": "Nie ma prawo i lewo - jest góra i dół", author: "Tomasz Agencki (AgenTomasz)"},
{"content": "If a man drinks wine and not water I cannot say he is acting irrationally. At most I can say that in his place I would not do so. But his pursuit of happiness is his own business, not mine.", author: "Ludwig von Mises"},
{"content": "Najmniejszą mniejszością na Ziemi jest jednostka. Ci, którzy odmawiają praw jednostkom, nie mogą twierdzić, że są obrońcami mniejszości", author: "Ayn Rand"},
{"content": "Co się stało na boisku, zostaje na boisku", author: "Bartek Zdybowicz"},
{"content": "Zapraszam Cie na kolacje i sniadanie - i żeby nie było wątpliwości - w takiej właśnie kolejnosci.", author: "Daniel Zaborowski"},
{"content": "jak byłem w podstawówce to
@kmorcinek
kmorcinek / readBooksByMe
Last active June 16, 2016 18:01
Przeczytane przeze mnie ksiażki
{"books": [
{"title": "New", "author": "CreateNewDoc()", "source": "http://google.com", "aroundDate": "12/12/12"},
{"title": "Algorithms", "author": "Robert Sedgewick", "source": "https://www.dropbox.com/s/37be80lwggp7fg9/Algorithm.pdf?dl=0", "aroundDate": "01/07/2011"},
{"title": "Pan raczy żartować, panie Feynman!", "author": "Richard Phillips Feynman", "source": "http://lubimyczytac.pl/ksiazka/38067/pan-raczy-zartowac-panie-feynman-przypadki-ciekawego-czlowieka", "aroundDate": "01/02/2014"},
{"title": "Rozmowy z katem", "author": "Kazimierz Moczarski", "source": "http://lubimyczytac.pl/ksiazka/6633/rozmowy-z-katem", "aroundDate": "01/02/2014", finished: false},
{"title": "The Truth About HTML5 (For Web Designers)", "author": "Luke Stevens ", "source": "http://www.truthabouthtml5.com/", "aroundDate": "01/04/2014"},
{"title": "Mastering Web Application Development with AngularJS", "author": "Pawel Kozlowski;Peter Bacon Darwin", "source": "http://www.amazon.com/Mastering-We
@kmorcinek
kmorcinek / ObjectExtensions
Created April 2, 2014 10:08
Chained null checks and the Maybe monad & others
using System;
public static class ObjectExtensions
{
public static TResult With<TInput, TResult>(this TInput o, Func<TInput, TResult> evaluator)
where TResult : class
where TInput : class
{
if (o == null) return null;
return evaluator(o);
List.map
List.filter
type Position =
struct
val X : int
val Y : int
new(x, y) = { X = x; Y = y}
end
@kmorcinek
kmorcinek / _vimrc
Created December 15, 2014 13:18
Vim configuration file _vimrc
set tabstop=4 shiftwidth=4 expandtab
private IEnumerable<string> GetAlphabetVariations()
{
char[] alphabet = "abcdefghijklmnopqrstuvwxyz".ToCharArray();
foreach (var first in alphabet)
{
foreach (var second in alphabet)
{
yield return "" + first + second;
}
public struct Option<T> : IEquatable<Option<T>>
{
[SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
public static readonly Option<T> None = new Option<T>();
private readonly T _value;
private readonly bool _hasValue;
public T Value
{
get