Skip to content

Instantly share code, notes, and snippets.

/// <summary>
/// Creates convention-based routing rules
/// </summary>
public sealed class RedirectToDynamicCommand
{
readonly IDictionary<Type, Wire> _dict = new Dictionary<Type, Wire>();
sealed class Wire
{
public MethodInfo Method;
image: ruby2.0.0
script:
- cp config/database.example.yml config/database.yml
- bundle install
- psql -c 'create extension hstore;' -U postgres -h 127.0.0.1
- psql -c 'create role exmu with superuser login;' -U postgres -h 127.0.0.1
- psql -c 'create database exmu_test;' -U postgres -h 127.0.0.1
- bundle exec rake db:test:prepare
- bundle exec rspec spec
services:
@abdullin
abdullin / LICENSE
Last active July 10, 2020 21:31
Naive ring benchmark in .NET Core using simulated actors
MIT License 2018 Rinat Abdullin
@abdullin
abdullin / errors.txt
Created August 17, 2022 09:36
A list of Kubeflow errors discovered while trying to build a simple pipeline.
(tracking them here just ouf of amusement)
Incompatible argument passed to the input "in_model_path" of component "step-train": Argument type "String" is incompatible with the input type "GCSPath"
Passing value "data" with type "String" (as "Parameter") to component input "in_model_path" with type "GCSPath" (as "Artifact") is incompatible. Please fix the type of the component input.
ValueError: Unexpected type
TypeError: The pipeline argument "model_path" is viewed as an artifact due to its type "Path". And we currently do not support passing artifacts as pipeline inputs. Consider type annotating the argument with a primitive type, such as "str", "int", "float", "bool", "dict", and "list".
@abdullin
abdullin / ddd-in-golang.markdown
Last active October 10, 2023 00:46
DDD in golang

This is my response to an email asking about Domain-Driven Design in golang project.

Thank you for getting in touch. Below you will find my thoughts on how golang works with DDD, changing it. This is merely a perception of how things worked out for us in a single project.

That project has a relatively well-known domain. My colleagues on this project are very knowledgeable, thoughtful and invested in quality design. The story spelled out below is a result of countless hours spent discussing and refining the approach.

Conclusions could be very different, if there was a different project, team or a story-teller.

Short story

@abdullin
abdullin / SessionStore.js
Created March 6, 2015 10:43
Example of a Flux Store that maintains session token in a cookie
"use strict";
var createStore = require("fluxible/utils/createStore");
var client = require("../client");
var cookies = require("cookies-js");
var debug = require("debug")("ClientTokenStore");
var ClientTokenStore = createStore({
storeName: "ClientSessionStore",