vagrant - free and open-source software for creating and configuring virtual development environments. Get it from here.
Put vagrant file into root directory from the gist.
Change --memory
and --cpu
if needed.
# On host
vagrant up
AddHandler wsgi-script .wsgi | |
RewriteEngine on | |
RewriteBase / | |
RewriteRule ^(media/.*)$ - [L] | |
RewriteRule ^(static/.*)$ - [L] | |
RewriteCond %{REQUEST_URI} !(django.wsgi) | |
RewriteRule ^(.*)$ django.wsgi/$1 [L] |
#!/usr/bin/python | |
venv = '/PATH_TO_ENVIRONMENT/bin/activate_this.py' | |
execfile(venv, dict(__file__=venv)) | |
import locale | |
locale.setlocale(locale.LC_ALL, 'ru_RU.utf8') | |
import sys | |
import os |
syntax on | |
set number | |
set hlsearch | |
" Get scheme from here: | |
" https://github.com/altercation/vim-colors-solarized | |
" colorscheme solarized§ | |
" set background=dark | |
" Disable the swap files creation |
# decorator | |
def pure_virtual(func): | |
def closure(*dt, **mp): | |
raise NotImplementedError("Method %s is pure virtual" % func.__name__) | |
return closure | |
class Abstarct(object): | |
""" Abstract class Class """ | |
@pure_virtual | |
def virtual_method(self): pass # Empty Virtual method |
currentNgModule.factory("Service1", function($log, $q, $timeout){ | |
return function() { | |
var deferred = $q.defer(); | |
$timeout(function(){ | |
$log.debug("In Service1"); | |
deferred.resolve("Service1"); | |
},1000); | |
return deferred.promise; | |
} | |
}); |
[user] | |
name = Boris Kopin | |
email = [email protected] | |
[core] | |
editor = vim | |
[color] | |
branch = auto | |
diff = auto |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |
# PIP | |
export PIP_DOWNLOAD_CACHE=$HOME/.pip_download_cache # http://stackoverflow.com/a/4806458/1094316 | |
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# MYSQL | |
MYSQL=/usr/local/mysql/bin | |
export PATH=$PATH:$MYSQL | |
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH |