Skip to content

Instantly share code, notes, and snippets.

Rinat Abdullin abdullin

Block or report user

Report or block abdullin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Structuring Neat .NET Core Command Line Apps Neatly.org
@abdullin
abdullin / SampleTracer.cs
Created Mar 20, 2018
A sample code to generate JSON dumps according to the catapult event format. Not used any more (planning to write a new one some time later).
View SampleTracer.cs
public sealed class Tracer {
int _traceId;
readonly Func<long> _clock;
StreamWriter _writer;
public Tracer(Func<long> clock) {
_clock = clock;
@abdullin
abdullin / LICENSE
Last active Oct 22, 2019
Naive ring benchmark in .NET Core using simulated actors
View LICENSE
MIT License 2018 Rinat Abdullin
View benc.cs
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Threading;
namespace SearchBench {
@abdullin
abdullin / fdb-flow.md
Created Aug 12, 2016 — forked from Preetam/fdb-flow.md
FoundationDB Flow
View fdb-flow.md

Flow: Actor-based Concurrency with C++

Engineering challenges

FoundationDB began with ambitious goals for both high performance per node and scalability. We knew that to achieve these goals we would face serious engineering challenges while developing the FoundationDB core. We'd need to implement efficient asynchronous communicating processes of the sort supported by Erlang or the Async library in .NET, but we'd also need the raw speed and I/O efficiency of C++. Finally, we'd need to perform extensive simulation to engineer for reliability and fault tolerance on large clusters.

To meet these challenges, we developed several new tools, the first of which is Flow, a new programming language that brings actor-based concurrency to C++11. To add this capability

View houzz.js
// Bookmarklet for making Houzz useful
javascript:$("img.viewImage, img.currentImage, img.space, img[id^=galleryImg], img[class^=browseListImage], .gallery-photo img").each(function() { var newSrc = this.src.replace(/[fs]images\/(\d+).*/, 'simages/$1_0_9-.jpg').replace(/_\d-/,'_16-'); $(this).parents("div.browseListBody").before("<a href='"+newSrc+"'><img src='"+newSrc+"' width=400></a>") });$("div.content-row").remove();
@abdullin
abdullin / reader.clj
Created Jan 26, 2016
Sample clojure code for searching log entries stored in chunks in custom binary format on Windows Azure
View reader.clj
(ns azurelog.reader
(:require [clj-time.core :as t]
[clj-time.format :as f]
[clojure.java.io :as io])
(:import [com.microsoft.azure.storage CloudStorageAccount]
[java.nio ByteOrder ByteBuffer]
[com.microsoft.azure.storage.blob]
[java.util.zip GZIPInputStream]
[org.apache.commons.io.input BoundedInputStream]))
View RedirectToWhen2.cs
public sealed class RedirectToDynamicEvent
{
public readonly IDictionary<Type, List<Wire>> Dict = new Dictionary<Type, List<Wire>>();
public sealed class Wire
{
readonly MethodInfo _method;
public Type ParameterType;
readonly object _subject;
readonly bool _includeVersion;
@abdullin
abdullin / performLogin.js
Created Mar 6, 2015
Flux action with login
View performLogin.js
var client = require("shared/client");
module.exports = function(context, payload, done) {
if (payload.login === undefined) {
throw new Error("Login must be defined");
}
if (payload.password === undefined) {
throw new Error("Password must be defined");
}
context.dispatch("event:LoginStarted");
@abdullin
abdullin / SessionStore.js
Created Mar 6, 2015
Example of a Flux Store that maintains session token in a cookie
View SessionStore.js
"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",
You can’t perform that action at this time.