Skip to content

Instantly share code, notes, and snippets.

View razum2um's full-sized avatar

Vlad Bokov razum2um

View GitHub Profile
>> IF = -> b { b }
=> #<Proc:0x007fb4e4049cc8 (lambda)>
>> LEFT = -> p { p[-> x { -> y { x } } ] }
=> #<Proc:0x007fb4e403d680 (lambda)>
>> RIGHT = -> p { p[-> x { -> y { y } } ] }
=> #<Proc:0x007fb4e4028ff0 (lambda)>
>> IS_EMPTY = LEFT

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

commit ce951e47a176ed6d460231e4f4606af443096b37
Author: Vlad Bokov <razum2um@mail.ru>
Date: Mon May 9 21:56:12 2011 +0700
banners block
diff --git a/.gitignore b/.gitignore
index 5f2338a..0235339 100644
--- a/.gitignore
+++ b/.gitignore
@razum2um
razum2um / gist:984201
Created May 21, 2011 03:21
zavode banners#2
diff --git a/cms/admin.py b/cms/admin.py
index 7e84d77..8438b67 100644
--- a/cms/admin.py
+++ b/cms/admin.py
@@ -9,6 +9,7 @@ from cms.models import *
from cms.forms import MenuItemAdminForm, BlockAdminForm
from cms.forms import NewsAdminForm, ArticleAdminForm
from cms.forms import GalleryAdminForm, ImageAdminForm
+from cms.forms import BannerAdminForm
# Utils
diff --git a/bin/ruby-whois b/bin/ruby-whois
index 46cc9af..7499de1 100755
--- a/bin/ruby-whois
+++ b/bin/ruby-whois
@@ -5,7 +5,7 @@ $:.unshift(File.expand_path("../../lib", __FILE__))
require 'optparse'
require 'ostruct'
require 'whois'
-
+require 'json'
#!/usr/bin/env python
import os
import sys
from datetime import datetime
from subprocess import Popen, PIPE
import json
class WhoisObject(object):
_data = {}
diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc
index 3e55f46..dd7b7d8 100644
--- a/CHANGELOG.rdoc
+++ b/CHANGELOG.rdoc
@@ -1,10 +1,10 @@
= Changelog
-== master
+== Release 2.0.4
@razum2um
razum2um / gist:1063986
Created July 4, 2011 21:47
django nested sets (level<=3) support
From bbb53d927c0949246c1735baaf34aa4261cfbb3c Mon Sep 17 00:00:00 2001
From: Vlad Bokov <razum2um@mail.ru>
Date: Tue, 5 Jul 2011 04:14:42 +0700
Subject: [PATCH] nested sets (level<=3) support
---
django/contrib/admin/options.py | 36 +++++++++++++++
.../admin/templates/admin/edit_inline/nested.html | 48 ++++++++++++++++++++
.../admin/templates/admin/edit_inline/tabular.html | 13 +++++-
3 files changed, 96 insertions(+), 1 deletions(-)
@razum2um
razum2um / gist:1064975
Created July 5, 2011 14:48
django CBV
# -*- coding: utf-8 -*-
from django.conf import settings
from django.views.generic import TemplateView, DetailView, CreateView, UpdateView
from django.shortcuts import get_object_or_404
from django.forms.models import inlineformset_factory
from django.core.paginator import Paginator, InvalidPage, EmptyPage
from django.core.urlresolvers import reverse
from django.utils.decorators import classonlymethod
from django.utils import simplejson
from django.http import HttpResponse, HttpResponseForbidden
diff --git a/django/db/backends/postgresql_psycopg2/creation.py b/django/db/backends/postgresql_psycopg2/creation.py
index 1f5609a..4468062 100644
--- a/django/db/backends/postgresql_psycopg2/creation.py
+++ b/django/db/backends/postgresql_psycopg2/creation.py
@@ -34,9 +34,12 @@ class DatabaseCreation(BaseDatabaseCreation):
def sql_table_creation_suffix(self):
assert self.connection.settings_dict['TEST_COLLATION'] is None, "PostgreSQL does not support collation setting at database creation time."
+ suffix = ''
+ if self.connection.settings_dict.get('TEST_TABLESPACE'):