Skip to content

Instantly share code, notes, and snippets.

Maksim Koryukov maxkoryukov

Block or report user

Report or block maxkoryukov

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
maxkoryukov /
Created Aug 23, 2018
Python: convert IRI (in two words: URL with non-ascii characters) into valid URI. This func makes it easy to open any URL in python with urllib2. ORIGINAL:
def asciify_url(url, force_quote=False):
Attempts to make a unicode url usuable with ``urllib/urllib2``.
More specifically, it attempts to convert the unicode object ``url``,
which is meant to represent a IRI, to an unicode object that,
containing only ASCII characters, is a valid URI. This involves:
maxkoryukov /
Created May 28, 2017 — forked from Ashton-W/
GitHub Markdown toggle code block
Click to toggle contents of `code` ``` CODE! ```
Click to toggle contents of other `code` ```
maxkoryukov /
Created May 3, 2017 — forked from juanje/
Limit Chrome from eating all the memory and CPU

I was tired of Chrome eating all my laptop resources so I decided to put some limit to it with cgroup.

As I was using Ubuntu 12.04 with support for cgroup, I installed the package cgroup-bin and add the following group to the file /etc/cgconfig.conf:

group browsers {
    cpu {
#       Set the relative share of CPU resources equal to 25%
        cpu.shares = "256";
maxkoryukov / cleanup-svg.xsl
Created Apr 1, 2017
Cleanup vendor tags from SVG
View cleanup-svg.xsl
<?xml version="1.0" encoding="utf-8"?>
maxkoryukov /
Last active Jun 9, 2018
Python __json__
# -*- coding: utf-8 -*-
import datetime
import simplejson
__dumps = simplejson.dumps
def dumpsOverloaded(*args, **kwargs):
maxkoryukov / Program.cs
Created Aug 16, 2016
CSharp Remove Comments
View Program.cs
using System;
using System.IO;
using CSharpMinifier;
namespace MinifySolution
class Program
static void Main(string[] args)
maxkoryukov / dbml2sql.xsl
Created Apr 24, 2016
Simple .dbml to .sql converter (XSLT)
View dbml2sql.xsl
<?xml version="1.0" encoding="utf-8"?>
<xsl:output method="text" omit-xml-declaration="yes" encoding="UTF-8" indent="yes"/>
<xsl:variable name="newline" select="'&#xa;'"/>
<xsl:template match="dbml:Database">
<xsl:for-each select="dbml:Table">
View lighttpd.conf
# lighttpd configuration file
# use it as a base for lighttpd 1.0.0 and above
# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
############ Options you really have to take care of ####################
## modules to load
# at least mod_access and mod_accesslog should be loaded
maxkoryukov /
Last active Apr 20, 2016
Headphones Description


Download sources (currently master is the latest actual version):

git clone .

Second step: run the app

You can’t perform that action at this time.