Skip to content

Instantly share code, notes, and snippets.

@koutoftimer
koutoftimer / GDD
Created March 30, 2014 01:53
Game design document for open source planformer
# Overview
## Brief
It is an action, role-playing, 2d platformer game with focus on fighting, character building, extensive storyline with a lot of side quests.
## Characters
There are only one type of character and only you determine which way to go: powerfull melee, silent assacin, archer, mage, summoner or so.
@koutoftimer
koutoftimer / run.sh
Last active August 29, 2015 14:10
shh socks5 proxy with Firefox
#!/usr/bin/env bash
echo Now run firefox -> preferences -> advanced -> network -> settings -> Manual proxy configuration \
SOCKS Host: 127.0.0.1 Port:8080
# Change user@superhost.com with any ssh alias or so
ssh -D 8080 -C -N user@superhost.com
@koutoftimer
koutoftimer / .tmux.conf
Last active August 29, 2015 14:11
tmux config
# replace C-B (command) with symbol `
set -g prefix `
bind ` send-prefix
# command+a paste symbol `
bind-key a send-keys `
# command+r reread conf file
bind-key r source-file ~/.tmux.conf
@koutoftimer
koutoftimer / .vimrc
Last active August 29, 2015 14:13
Base vim configuration
""""""""""""""""""""""""""""
" Vandle
""""""""""""""""""""""""""""
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
@koutoftimer
koutoftimer / preconfig.sh
Last active August 29, 2015 14:13
Script to preconfigure new system with custom settings
#!/usr/bin/env bash
# ~*~ coding: utf-8 ~*~
##########################################
# Installing commons
##########################################
command_exist () { which $1 > /dev/null; }
# Install vim
/**
* Create a new socket instance between client and server,
* and start use it
*
* @method mySocketChatRoom
*
* @param roomId {String} A unique string to represent a single room
* @param username {String} The username to use on this room
*/
function mySocketChatRoom(roomId, username) {
@koutoftimer
koutoftimer / habraproxy.py
Last active October 25, 2015 12:23
habraproxy
# ~*~ encoding: utf-8 ~*~
import argparse
import re
import requests
from urllib import urlencode
from urlparse import urljoin, urlparse
from bs4 import BeautifulSoup
from flask import Flask, Response, stream_with_context, request
@koutoftimer
koutoftimer / midnight_db_dump.sh
Last active October 7, 2016 11:31
Template for contab job about dumping mysql database for django applications
#!/usr/bin/env bash
# -*- encoding: utf-8 -*-
# Script makes a backup of mysql database by retieving settings from .env file.
#
# 'stdout' stream can be logged but script itself has no logging logic.
#
# If everything goes right, exit code will be equal to zero so you can use this
# for builing wrappers around it to infrom that backup failed execution.
@koutoftimer
koutoftimer / run.py
Last active November 6, 2016 22:38
Resolve tail recursion depth limitation in python
"""
Thanks to Kyle Miller for his article "Tail call recursion in Python" [1].
Despite how good is to remove this limitation, probably, you have to be
aware of why this feature is not officially supported. [2]
[1]: http://www.kylem.net/programming/tailcall.html
[2]: http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.html
"""
!function() {
/*
RequireJS 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
Available via the MIT or new BSD license.
see: http://github.com/jrburke/requirejs for details
*/
/**
* @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.