This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compass create -r ninesixty vizavi-layout --using 960 --syntax sass --sass-dir "sass" --css-dir "css" --javascripts-dir "js" --images-dir "images" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding: UTF-8 -*- | |
import re | |
def recognize_phone(s): | |
""" | |
>>> f = recognize_phone | |
>>> f(u'8-912-234-56-78') | |
u'8-912-234-56-78' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def permutations(l): | |
""" | |
>>> f = permutations | |
>>> f(['a', 'b']) | |
[('a', 'b'), ('b', 'a')] | |
>>> f(['a', 'b', 'c']) | |
[('a', 'b', 'c'), ('a', 'c', 'b'), ('b', 'a', 'c'), ('b', 'c', 'a'), ('c', 'a', 'b'), ('c', 'b', 'a')] | |
""" | |
if len(l) == 1: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rails', '3.2.1' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you create xml via ElementFlow and make some bad things (and exceptions raise) | |
# you will get invalid xml (only a criple part of the xml you wish to have). | |
# | |
# This is a wrapper for ElementFlow for 'atomic' xml: it either created or not. | |
import shutil | |
import tempfile | |
class ElementFlowAtomicOutputWrapper(object): | |
def __init__(self, out_file_path): |
NewerOlder