Skip to content

Instantly share code, notes, and snippets.


Ruslan Osipov ruslanosipov

View GitHub Profile
ruslanosipov / default.html
Created Nov 4, 2018
View default.html
<link rel="Stylesheet" type="text/css" href="%root_path%style.css" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
.center {
margin-left: auto;
margin-right: auto;
ruslanosipov / .tmux.conf
Created Aug 8, 2014
Configuration for tmux, good for use with Vim
View .tmux.conf
# Use C-\ as a control sequence.
unbind-key C-b
set -g prefix 'C-\'
bind-key 'C-\' send-prefix
# Easy-to-remember split pane commands.
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
ruslanosipov /
Created Jun 2, 2014
Script to convert WordPress posts to plain text files
#!/usr/bin/env python
"""This script converts WXR file to a number of plain text files.
WXR stands for "WordPress eXtended RSS", which basically is just a
regular XML file. This script extracts entries from the WXR file into
plain text files. Output format: article name prefixed by date for
posts, article name for pages.
Usage: filename [-o output_dir]
ruslanosipov / rails_secure.rb
Created Jun 19, 2013
Rails server over SSL, do "bundle exec ruby scripts/rails_secure.rb server"
View rails_secure.rb
#!/usr/bin/env ruby
require 'rubygems' # if ruby 1.8.7
require 'rails/commands/server'
require 'rack'
require 'webrick'
require 'webrick/https'
module Rails
class Server < ::Rack::Server
def default_options
ruslanosipov /
Created May 17, 2013
Gists downloader, add your token, chmod +x, add it to your path and do "shgist file" to download your gist
#!/usr/bin/env python
# Ruslan Osipov <>
# Usage: shgist keywords
# Description: Gists downloader
import urllib
import urllib2
import sys
ruslanosipov / usrswitch
Created Apr 24, 2013
Little script that swaps local gitconfig files used in git version 1.7.10 and up (include.path ~/.gitconfig.local)
View usrswitch
#!/usr/bin/env sh
# Ruslan Osipov, April 2013
# Little script that swaps local gitconfig files used in git version
# 1.7.10 and up (include.path ~/.gitconfig.local).
# Requirements:
# Little set_prompt function from
# ~/.gitconfig.local
You can’t perform that action at this time.