Skip to content

Instantly share code, notes, and snippets.

View kekekeks's full-sized avatar

Nikita Tsukanov kekekeks

  • Kazakhstan, Astana
View GitHub Profile
@kekekeks
kekekeks / ru_en_analyzer
Last active April 12, 2023 15:16
russian + english analyzer for elasticsearch русский + английский
{
"settings": {
"analysis": {
"filter": {
"english_stop": {
"type": "stop",
"stopwords": "_english_"
},
"english_stemmer": {
"type": "stemmer",
using System;
namespace Kebrum.Widgets
{
public class CairoBridge:IDisposable
{
private Cairo.ImageSurface m_Surface;
private System.Drawing.Graphics m_Graphics;
private System.Drawing.Bitmap m_Bitmap;
@kekekeks
kekekeks / interlockedCompareExchange.lua
Last active January 3, 2016 08:39
Interlocked compare exchange for Redis EVAL "<script>" 1 <key> <sequenceId> <keyCount> <key1> <value1> <key2> <value2>
local oldSeq; local oldData;
oldSeq = redis.call('hget',KEYS[1], 'sequence')
oldData = redis.call('hgetall',KEYS[1])
if oldSeq and tonumber(oldSeq) >= tonumber(ARGV[1]) then
return -1
else
redis.call('hset', KEYS[1], 'sequence', ARGV[1]);
local maxi = tonumber(ARGV[2])*2 + 3;
for idx = 3, maxi, 2 do
@kekekeks
kekekeks / test
Created May 12, 2013 10:07
Test for MonoLib demo
Hello world!