Skip to content

Instantly share code, notes, and snippets.

Gennady Chibisov chibisov

Block or report user

Report or block chibisov

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
chibisov / gist:71706c196042e3ae1193
Created Jun 17, 2015
Mute yandex radio advertisment
View gist:71706c196042e3ae1193
var volumeShouldBeOn = true;
var volumeIsOn = !Boolean($('.volume__icon_mute').length);
var isAdvShown = $('.slider__item_advert.slider__item_shown').length;
if (isAdvShown) {
volumeShouldBeOn = false;
if ((volumeShouldBeOn && !volumeIsOn) || (!volumeShouldBeOn && volumeIsOn)) {
View QuerySet wrapper
class QuerySet(object):
def __init__(self, query=None):
self.query = query or {}
def _clone(self):
return type(self)(query=deepcopy(self.query))
def __getitem__(self, k):
if isinstance(k, slice):
chibisov / gist:10470006
Created Apr 11, 2014
View gist:10470006
from django.conf import settings
from django.contrib.auth.models import Group
from django.contrib.auth.models import Permission
from django.contrib.auth.models import AnonymousUser
from django.utils.importlib import import_module
import six
import sys
chibisov / python
Last active Dec 22, 2015
Show request info in chrome dev tools manner. Tornado used
View python
#!/usr/bin/env python
$ curl -d 'hello=world' http://localhost:8888/path/?someparam=1
Request URL: http://localhost:8888/path/?someparam=1
Request Method: POST
Request Headers:
Host: localhost:8888
Content-Type: application/x-www-form-urlencoded
chibisov / chosen-custom-styles.css
Created Dec 13, 2011
View chosen-custom-styles.css
overflow: visible !important;
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
You can’t perform that action at this time.