Skip to content

Instantly share code, notes, and snippets.

@Ivoz
Ivoz / .bashrc
Created September 30, 2012 13:45
# Virtualenvwrapper settings
export WORKON_HOME=~/.virtualenvs
export PROJECT_HOME=~/code
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/bin/virtualenv2
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
#export PIP_REQUIRE_VIRTUALENV=true
export PIP_RESPECT_VIRTUALENV=true
export PIP_VIRTUALENV_BASE=$WORKON_HOME
source /usr/bin/virtualenvwrapper.sh
@Ivoz
Ivoz / .xinitrc
Created October 8, 2012 02:45
~/.xinitrc
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
class Class
def attr_accessor_with_history(attr_name)
attr_name = attr_name.to_s
attr_reader attr_name
attr_reader attr_name+"_history"
define_method("#{attr_name}=") do |value|
prev = instance_variable_get "@#{attr_name}_history"
prev = [nil] if prev.nil?
prev << value
instance_variable_set "@#{attr_name}_history", prev
------------------------------------------------------------
/home/ivo/.virtualenvs/salt/bin/pip run on Fri Oct 26 07:56:44 2012
Downloading/unpacking salt
Getting page http://pypi.python.org/simple/salt
URLs to search for versions for salt:
* http://pypi.python.org/simple/salt/
Getting page http://saltstack.org
Getting page https://github.com/thatch45/salt
Analyzing links from page http://pypi.python.org/simple/salt/
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Arnaud Renevier <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Arnaud Renevier <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@Ivoz
Ivoz / pip.log
Created February 13, 2013 16:55
gevent 1.0rc2 build from scratch failure
------------------------------------------------------------
/home/ivo/.virtualenvs/pytest/bin/pip run on Thu Feb 14 03:41:03 2013
Obtaining gevent from git+git://github.com/SiteSupport/[email protected]#egg=gevent
...
... # package searching
...
Skipping link https://github.com/security (from https://github.com/python-greenlet/greenlet); not a file
Found link https://github.com/python-greenlet/greenlet/zipball/master#egg=greenlet-dev (from https://github.com/python-greenlet/greenlet), version: dev
#!/usr/bin/env python
#
# Copyright (C) 2011, 2012, 2013 Strahinja Val Markovic <[email protected]>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
from gevent import wsgi
def simple_app(environ, start_response):
headers = [('Content-Type', 'text/plain')]
start_response('200 OK', headers)
def content():
# We start streaming data just fine.
yield 'The dwarves of yore made mighty spells,'
yield 'While hammers fell like ringing bells'
"""Modum
Usage:
modum [options]
modum -h | --help
modum -v | --version
Options:
-h --help Show this screen.
-v --version Show version.