Skip to content

Instantly share code, notes, and snippets.

View y10h's full-sized avatar

Yury Yurevich y10h

  • San Francisco Bay Area
View GitHub Profile
#!/usr/bin/env python
"""
Bootstrap script for prepare environ for project
"""
import os
import subprocess
import optparse
import sys
diff --git a/procrustes/__init__.py b/procrustes/__init__.py
index a0aa83e..6c31d06 100644
--- a/procrustes/__init__.py
+++ b/procrustes/__init__.py
@@ -1,7 +1,5 @@
# (c) Svarga project under terms of the new BSD license
-__version__ = '0.1'
-
from functools import partial
@y10h
y10h / redis_vs_sqlite.py
Created November 7, 2011 10:04 — forked from perses76/redis_vs_sqlite.py
Redis vs SQLite
from datetime import datetime
import redis
import random
import sqlite3
BROKER_HOST = "localhost" # Maps to redis host.
REDIS_PASSWORD = None
KEY_PREFIX = "speed_"
ALPHABETE = "qwertyuiopasdfghjklzxcvbnm1234567890QWERTYUIOPASDFGHJKLZXCVBNM"
SQLITE_DB = ":memory:"
#!/usr/bin/env python
import random
import redis
def adjust_score(score):
return score + random.choice([-0.5, +0.5])
def store_set(set_x, key, cli):
@y10h
y10h / omskvelofix.js
Last active June 1, 2016 06:33
TamperMonkey script to fix too close vote up/vote down buttons.
// ==UserScript==
// @name OmskveloVoteFix
// @namespace https://gist.github.com/j2a/76933e7d9c8dd7067ef4fa89cf3af75e/edit
// @version 0.1
// @description Fix size and position of voting buttons on omskvelo.ru.
// @author Yury Yurevich
// @match http://omskvelo.ru/index.php?/topic/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js
// ==/UserScript==