This file contains 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
[color] | |
ui = auto | |
[advice] | |
statusHints = false | |
[merge] | |
defaultToUpstream = true | |
[alias] | |
st = status -sb | |
me = log --author=wraithan | |
lg = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative |
This file contains 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
In [5]: orders = Order.objects.all().order_by('?') | |
In [6]: str(orders.query) | |
Out[6]: 'SELECT "orders_order"."id", "orders_order"."created_at", "orders_order"."created_by", "orders_order"."updated_at", "orders_order"."updated_by", "orders_order"."_aggregate_searchable_field", "orders_order"."checkout_payment_type_id", "orders_order"."customer_id", "orders_order"."has_applied_debit", "orders_order"."has_been_palletized", "orders_order"."historical_invoice_number", "orders_order"."invoice_date", "orders_order"."order_code", "orders_order"."order_date", "orders_order"."order_status", "orders_order"."origin", "orders_order"."price_level", "orders_order"."shipped_date", "orders_order"."cached_is_paid", "orders_order"."is_paid_recalculation_needed" FROM "orders_order" ORDER BY RANDOM()' |
This file contains 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
When I attended <a href="http://djangocon.us/">DjangoCon</a> I decided I needed to work a bit less on my own projects and start putting more time into contributing to other projects. I use so many free and open libraries both in my work and my personal code, and it is time to start contributing again.<br /> | |
<br /> | |
The first project I decided to try to contribute to was <a href="http://readthedocs.org/">Read the Docs</a>. The choice was pretty easy since I know <a href="http://ericholscher.com/">Eric Holscher </a>and it is a project I benefit from on a regular basis. So at the DjangoCon sprints I sat down near him and asked him if there were any particularly valuable tickets I could take and start hacking on. He gave me a list of issues and I started in.<br /> | |
<br /> | |
By the end of the day I had a patch for RTD, granted it didn't fully work but it was a start. Added some unit tests and fixed up the code and soon I had a complete contribution that was added and it made me smile. And smile even more to be added t |
This file contains 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
[color] | |
ui = auto | |
[advice] | |
statusHints = false | |
[merge] | |
defaultToUpstream = true | |
[alias] | |
st = status -sb | |
me = log --author=Chris | |
lg = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative |
This file contains 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
root@third:~# sudo -u user virtualenv /tmp/meh | |
New python executable in /tmp/meh/bin/python | |
Installing setuptools............done. | |
Installing pip......... | |
Complete output from command /tmp/meh/bin/python /tmp/meh/bin/easy_install /usr/local/lib/pytho...ort/pip-1.0.1.tar.gz: | |
Processing pip-1.0.1.tar.gz | |
Running pip-1.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-B5WxiE/pip-1.0.1/egg-dist-tmp-_31gSV | |
warning: no files found matching '*.html' under directory 'docs' | |
warning: no previously-included files matching '*.txt' found under directory 'docs/_build' | |
no previously-included directories found matching 'docs/_build/_sources' |
This file contains 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 f(): | |
... try: | |
... return 10 | |
... except: | |
... return 20 | |
... finally: | |
... return 30 | |
... | |
>>> f() | |
30 |
This file contains 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
config = { | |
server: 'irc.freenode.net', | |
nick: 'ZenIRCBot', | |
options: { | |
userName: 'zenircbot', | |
realName: 'ZenIRCBot', | |
port: 6667, | |
debug: false, | |
showErrors: false, | |
autoRejoin: true, |
This file contains 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
Now I have to write one hundred words in order to see a kitten. I love | |
to see a kitten they are pretty rad. I wonder how many random streams | |
of consciousnesses have been written for the soul purpose of getting | |
to see a kitten. Honestly I am really tempted to cheat and just hit | |
one letter and space over and over until I get to see the kitten. I'll | |
have to post this to a gist or something when I am done just to show | |
how inane things can get when you are just writing for the sake of | |
kittens. |
This file contains 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
import os | |
SITE_ROOT = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')) | |
TEMPLATE_DIRS = ( | |
os.path.join(SITE_ROOT, 'templates'), | |
) |
This file contains 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
export WORKON_HOME=$HOME/.virtualenvs | |
source `which virtualenvwrapper.sh` |