Skip to content

Instantly share code, notes, and snippets.

Avatar

Ruslan Osipov ruslanosipov

View GitHub Profile
@ruslanosipov
ruslanosipov / default.html
Created Nov 4, 2018
wiki/templates/default.html
View default.html
<html>
<head>
<link rel="Stylesheet" type="text/css" href="%root_path%style.css" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<title>%title%</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
.center {
margin-left: auto;
margin-right: auto;
@ruslanosipov
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
ruslanosipov / wxr2txt.py
Created Jun 2, 2014
Script to convert WordPress posts to plain text files
View wxr2txt.py
#!/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: wxr2txt.py filename [-o output_dir]
@ruslanosipov
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
ruslanosipov / shgist.py
Created May 17, 2013
Gists downloader, add your token, chmod +x, add it to your path and do "shgist file" to download your gist
View shgist.py
#!/usr/bin/env python
# Ruslan Osipov <ruslan@rosipov.com>
# Usage: shgist keywords
# Description: Gists downloader
import urllib
import urllib2
import sys
@ruslanosipov
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
# https://github.com/ruslanosipov/dotfiles/blob/master/.bashrc
# ~/.gitconfig.local
You can’t perform that action at this time.