- Read every row in the table
- No reading of index. Reading from indexes is also expensive.
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
| """ | |
| Tasks for managing a test server | |
| """ | |
| import os | |
| from fabric.api import cd, env, prefix, run, sudo, task | |
| from fabric.contrib.files import exists, sed | |
| from fabric.context_managers import hide | |
| from fabric.colors import green, red |
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
| #!/usr/bin/env python | |
| ## WARNING: This file is generated | |
| #!/usr/bin/env python | |
| """Create a "virtual" Python installation | |
| """ | |
| # If you change the version here, change it in setup.py | |
| # and docs/conf.py as well. | |
| virtualenv_version = "1.6.3" |
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
| """ | |
| jQuery templates use constructs like: | |
| {{if condition}} print something{{/if}} | |
| This, of course, completely screws up Django templates, | |
| because Django thinks {{ and }} mean something. | |
| Wrap {% verbatim %} and {% endverbatim %} around those | |
| blocks of jQuery templates and this will try its best |
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
| # Copyright 2012 Erlware, LLC. All Rights Reserved. | |
| # | |
| # This file is provided to you under the Apache License, | |
| # Version 2.0 (the "License"); you may not use this file | |
| # except in compliance with the License. You may obtain | |
| # a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, |
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 -*- | |
| from django import forms | |
| from crispy_forms.helper import FormHelper | |
| from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field | |
| from crispy_forms.bootstrap import AppendedText, PrependedText, FormActions | |
| class MessageForm(forms.Form): | |
| text_input = forms.CharField() |
- Swap Control and Caps Lock in System Preferences -> Keyboard -> Modifier Keys
- Google Chrome http://www.google.com/chrome/
- iTerm2 http://www.iterm2.com/
- Oh my zsh https://github.com/robbyrussell/oh-my-zsh/
- XCode (from the mac app store)
- XCode command line tools (run XCode, go to Preferences -> Downloads -> Command Line Tools)
- Homebrew https://github.com/mxcl/homebrew/wiki/installation
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
| -module(general_lib). | |
| -compile(export_all). | |
| -define(SECRET, "SOMETEXTHERE"). | |
| time_as_string() -> | |
| {MegaSeconds, Seconds, MicroSeconds} = erlang:now(), | |
| integer_to_list(MegaSeconds) ++ integer_to_list(Seconds) ++ integer_to_list(MicroSeconds). | |
| time_as_seconds() -> |
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
| class EventProxy | |
| @socket: null | |
| @amqp: null | |
| constructor: (socket, amqp) -> | |
| @socket = socket | |
| @amqp = amqp | |
| @amqp.on 'ready', @ready | |
| ready: => |
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
| class Foo(object): | |
| def __getattribute__(self, name): | |
| attr = object.__getattribute__(self, name) | |
| if callable(attr): | |
| def wrapper(*args, **kwargs): | |
| try: | |
| return attr(*args, **kwargs) | |
| except Exception, e: | |
| print "%s failed with exc %s" % (name, e) |