Skip to content

Instantly share code, notes, and snippets.

View mzahor's full-sized avatar

Marian Zagoruiko mzahor

  • LeanyLabs
  • Lviv, Ukraine
  • X @mzahor
View GitHub Profile
@mzahor
mzahor / squash.sh
Last active March 23, 2016 14:06
Branch squasher
#!/bin/bash
set -e
current_br=$(git name-rev --name-only HEAD)
tmp_br=${current_br}_temp
# remove temp branch if already exists
if [[ $(git br | grep ${tmp_br}) != '' ]]; then
git br -D ${tmp_br}
fi
@mzahor
mzahor / throttling_queue.cs
Last active May 23, 2017 02:01
Throttling task queue
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using NUnit.Framework;
namespace YammerCrawlSync
{
public class ThrottlingQueue : IDisposable
@mzahor
mzahor / js_proto_method_overloading.js
Last active September 7, 2015 15:50
Method overloading in js
var Person = function () {
this.name = "unnamed";
};
Person.prototype.getName = function () {
return this.name;
};
var Student = function () {
this.name = "Student";