Skip to content

Instantly share code, notes, and snippets.

@abdullin
abdullin / AzureLogSink.cs
Created October 16, 2013 06:30
Simple azure log that persists sliding log buffer in Azure blobs.
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.StorageClient;
namespace Lokad
{
// Simple azure log that persists sliding log buffer in Azure blobs.
@abdullin
abdullin / StartupProjectionHost.cs
Last active December 30, 2015 21:09
Projection replayer for Lokad.CQRS projects (legacy)
#region Copyright (c) 2006-2013 LOKAD SAS. All rights reserved
// This document is shared under BSD license
#endregion
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
@abdullin
abdullin / main.go
Created December 16, 2013 08:51
Sample web server written in Go with Tom Janssens. Nobody had any real experience in go :)
package main
import (
"fmt"
"net/http"
)
var queue chan string
var joblist []string
@abdullin
abdullin / FizzBuzz.hs
Created December 23, 2013 10:03
In search of perfection
m n p v|mod v n==0=p|True=[]
p n|null w=show n|True=w where w=(m 3"Fizz"n)++(m 5"Buzz"n)
f=map p[1..100]
@abdullin
abdullin / Dockerfile
Created February 18, 2014 04:25
FoundationDB dockerfile
FROM ubuntu:12.04
# For FDB 2.0.1
RUN apt-get update -qq
RUN apt-get install -y wget -qq
RUN cd /tmp ; wget https://foundationdb.com/downloads/I_accept_the_FoundationDB_Community_License_Agreement/2.0.1/foundationdb-clients_2.0.1-1_amd64.deb --no-check-certificate; \
wget https://foundationdb.com/downloads/I_accept_the_FoundationDB_Community_License_Agreement/2.0.1/foundationdb-server_2.0.1-1_amd64.deb --no-check-certificate
#Hack to avoid install problem - we break FDB server on purpose (to prevent if from starting)
RUN mkdir /etc/foundationdb && touch /etc/foundationdb/fdb.cluster
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
body {
width: 960px;
padding-top: 40px;
margin: auto;

Using Git Revision in Windows Azure Cloud Deployments

Here's a quick approach for including git versions of your codebase into Windows Azure Deployment labels (as visible in the Portal). This applies to Azure SDK 1.6 and probably higher. Versions are appended automatically whenever you trigger a publish from Visual Studio.

git versions usually are reported by git describe and could look like r40 (if there is r40 tag on the last commit) or r39-31-g48ac07c (if last tag r39 was 31 commits ago).

It works like this.

Step 1: Create new Azure Deployment profile for your deployment project. It will be saved somewhere to Profiles\ProjectName.azurePubxml.

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:

План моих докладов на ufa42conf в этот четверг 19:00 (updated)

Зарегистрироваться

30m : 5 Event-driven лайфхаков

  • Intro : Event-driven или reactive принципы
  • BDD и тестирование кода
  • Пусть код документирует себя
  • Простое масштабирование (latency + throughput)
@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