Skip to content

Instantly share code, notes, and snippets.

@asyncee
asyncee / xapian_install_webfaction.sh
Last active March 12, 2021 11:39
Install xapian on webfaction
mkdir -p ~/bin ~/src ~/lib/python2.7
cd ~/src
wget http://oligarchy.co.uk/xapian/1.2.10/xapian-core-1.2.10.tar.gz
tar zxf xapian-core-1.2.10.tar.gz
cd xapian-core-1.2.10
./configure --prefix=$HOME
make
make install
cd ..
wget http://oligarchy.co.uk/xapian/1.2.10/xapian-bindings-1.2.10.tar.gz
@asyncee
asyncee / xapian_install.sh
Created July 7, 2013 09:37
Install xapian
wget http://oligarchy.co.uk/xapian/1.2.10/xapian-core-1.2.10.tar.gz
tar zxf xapian-core-1.2.10.tar.gz
cd xapian-core-1.2.10
./configure
make -j14
make install
cd ..
wget http://oligarchy.co.uk/xapian/1.2.10/xapian-bindings-1.2.10.tar.gz
tar zxf xapian-bindings-1.2.10.tar.gz
cd xapian-bindings-1.2.10
#/bin/bash
echo "Packages needed for installation:"
echo "zlib1g-dev g++"
echo
echo "You can install it on debian-based distros with command:"
echo "apt-get install zlib1g-dev g++"
echo
if [ -z "$VIRTUAL_ENV" ]; then
@asyncee
asyncee / method_chaining.py
Created March 23, 2016 15:32
Method chaining in python example
import copy
from collections import namedtuple, Sequence
Item = namedtuple('Item', 'name, price')
items = [
Item('apple', 10.0),
Item('banana', 12.0),
Item('orange', 8.0),
import inspect
from nameko.extensions import ENTRYPOINT_EXTENSIONS_ATTR
from nameko.web.handlers import HttpRequestHandler
from werkzeug.routing import Map, Rule
class ResolveUrlError(Exception):
pass
@asyncee
asyncee / install.sh
Last active January 18, 2020 17:02
install openvpn on debian 9
# This script helps one to setup openvpn on a Debian 9 under OpenVZ.
# It uses external openvpn-install.sh script (read it carefully! https://git.io/vpn).
# Update system.
apt-get update
apt-get upgrade
# Add new user to system.
useradd -m vpn
@asyncee
asyncee / remove.sh
Created March 5, 2020 07:59
Delete branches merged into master or develop.
git branch -d $(git branch --merged=master | grep -v master)
git branch -d $(git branch --merged=develop | grep -v develop | grep -v master)