Skip to content

Instantly share code, notes, and snippets.


Lachezar Yankov lachezar

Block or report user

Report or block lachezar

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
lachezar / words.hs
Created Oct 5, 2019
Words in Haskell vs Typescript
View words.hs
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE QuasiQuotes #-}
module Lib
( run
) where
import Text.Regex.PCRE.Heavy
newtype Word' =
lachezar / config.exs
Created Oct 18, 2016
View config.exs
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
config :kafka_ex,
# a list of brokers to connect to in {"HOST", port} format
brokers: [
{"localhost", 9092}
# the default consumer group for worker processes, must be a binary (string)
lachezar /
Last active Sep 14, 2015
Helper class to get the consumer friendly device name. Upvote
* Copyright (C) 2015 Jared Rummler <>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
lachezar / bookmarklet
Last active Aug 29, 2015
Sans Bullshit Sans bookmarklet
View bookmarklet
lachezar /
Created Jan 19, 2014
Python dict to object
config_dict = {
'group1': {
'server1': {
'apps': ('nginx', 'mysql'),
'cpus': 4
'maintenance': True
'firewall_version': '1.2.3',
'python2.7': True
lachezar /
Last active Dec 17, 2015
Kick pylint on your python files and send notifications to osx notification center. It might be useful to get notified of nasty errors while you type your code...
kicker -e 'X="`pylint -r n **/*.py 2>/dev/null | tee /dev/tty | sed -n 2p`"; if [ -n "$X" ]; then curl -s -L -G --data-urlencode "message=$X" http://localhost:1337/fail; fi' **/*.py
View utmstrip.user.js
// ==UserScript==
// @name UTM param stripper
// @author Paul Irish
// @namespace
// @version 1.1
// @description Drop the UTM params from a URL when the page loads.
// @extra Cuz you know they're all ugly n shit.
// @include http://*
// ==/UserScript==
lachezar / life.html
Created Jul 24, 2011
Game of Life (Javascript + HTML5's Canvas)
View life.html
<!DOCTYPE html>
<title>Game of Life</title>
<canvas id="canvas" width="400" height="300">There should be a canvas somewhere here.... :-/</canvas>
<script type="text/javascript">
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
lachezar / index.html
Created Jun 13, 2011
Mandelbrot + Web Workers
View index.html
<!DOCTYPE html>
<title>Mandelbrot + Web Workers!</title>
<canvas id="canvas" width="800" height="600" style="float: left">There should be a canvas here?!</canvas>
<script type="text/javascript">
lachezar / MultiDrawClient.html
Created Mar 22, 2010
Web Sockets based application for realtime drawing
View MultiDrawClient.html
<!DOCTYPE html>
<html xmlns="">
<title>MultiDraw - Offline</title>
<meta charset="UTF-8">
<script type="text/javascript">
window.onload = function() {
try {
var s = new WebSocket("ws://" + + ":6789/");
s.onopen = function(e) { document.title = 'MultiDraw - Online'; }
You can’t perform that action at this time.