Skip to content

Instantly share code, notes, and snippets.

View mylokin's full-sized avatar

Andrey Gubarev mylokin

View GitHub Profile
input_driver = "sdl2"
input_device = "BLISS-BOX 4-PLAY PORT.4"
input_vendor_id = "5840"
input_product_id = "3335"
input_b_btn = "1"
input_y_btn = "0"
input_select_btn = "4"
input_start_btn = "5"
input_a_btn = "9"
@mylokin
mylokin / .bashrc
Created September 18, 2017 20:30 — forked from copperlight/.bashrc
Window Subsystem for Linux ssh-agent Configuraton
# ... more above ...
# wsfl bash is not a login shell
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# ssh-agent configuration
if [ -z "$(pgrep ssh-agent)" ]; then
rm -rf /tmp/ssh-*
diff --git a/django/dispatch/dispatcher.py b/django/dispatch/dispatcher.py
index d26433a..ba97077 100644
--- a/django/dispatch/dispatcher.py
+++ b/django/dispatch/dispatcher.py
@@ -1,11 +1,13 @@
-import weakref
+import sys
import threading
+import weakref
@mylokin
mylokin / post-receive.sh
Created August 1, 2012 12:37
post-receive git hook
#!/bin/bash
unset GIT_DIR
REPO_PATH=/var/www/casahop/travelocial
ENV_PATH=/usr/local/share/virtualenvs/casahop
CONFIG_PATH=/home/ben/configs
BRANCH=master
while read oldrev newrev refname
do
@mylokin
mylokin / profile_json.py
Created March 4, 2012 17:19
Testing performance of json, anyjson, cjson, simplejson
import anyjson
import cjson
import json
import simplejson
import time
anyjson.dumps = anyjson.serialize
anyjson.loads = anyjson.deserialize
cjson.dumps = cjson.encode
cjson.loads = cjson.decode