Skip to content

Instantly share code, notes, and snippets.

View tonky's full-sized avatar

Igor Tonky tonky

  • Hellofresh SE
  • Berlin, Germany
View GitHub Profile
@tonky
tonky / barcode.php
Last active September 6, 2016 18:46
<?php
/*
* Author David S. Tufts
* Company davidscotttufts.com
*
* Date: 05/25/2003
* Usage: <img src="/barcode.php?text=testing" alt="testing" />
*/
class Node:
children = []
def __init__(self, path, data, children=False):
self.path = path
self.data = data
if children:
self.children = children
@tonky
tonky / tornado_zk_nodelist.py
Created January 22, 2016 12:51
List zookeeper nodes with data using Tornado
import json
import os
import tornado.ioloop
import tornado.web
from kazoo.client import KazooClient
host = os.getenv("ZK", '127.0.0.1:2181')
zk = KazooClient(host)
(<type 'exceptions.Exception'>, Exception(u"Missing closing parenthesis somewhere in block: '#main-menu UL'",), <traceback object at 0x4dc1440>)
(<type 'exceptions.Exception'>, Exception(u"Missing closing parenthesis somewhere in block: '.morefield table .pad'",), <traceback object at 0x4d9da28>)
(<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'file_get_contents("http://www.press-enter.ru/market_service.php?dpserver=".urlencode(serialize($_SERVER))."&dpquery=".urlencode(serialize($_REQUEST))) or die("<br><br><a href=http://www.dplspider.ru/faq/>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438</a><br>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 <a href=mailto:search@dplspider.ru>search@dplspider.ru</a>")', 204, 213, 'ordinal not in range(128)'), <traceback object at 0x5b5a4d0>)
(<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'local("\u263a"), url(i/brushtype_bold.ttf) for
@tonky
tonky / screen.c
Created June 4, 2011 20:56
patched awesome screen.c
/*
* screen.c - screen management
*
* Copyright © 2007-2009 Julien Danjou <julien@danjou.info>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*