ches


Member since 07/18/2007

Name: Ches

ches

Location: Cambridge, MA

Website: http://chesmart.in

12 snippets

368 profile views

5 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

ches's Recent Snippets



« Prev 1 Next »
This context manager restores the value of the current working directory (cwd) after the enclosed code block completes or raises an exception. If a directory name is supplied to the context manager then the cwd is changed prior to running the code b...
0 65 posted 8 years ago by ches
Based on the good initial coverage [over here](http://www.thamtech.com/blog/2008/03/29/gmail-to-google-apps-email-migration/).
1 83 posted 10 years ago by ches
\Q...\E perl quoting means no ugly escaping in the regex. find's -print0 with xargs -0 is the secret to handling files with spaces in their names.
1 114 posted 12 years ago by ches
Create a copy of a text file with blank lines removed.
0 67 posted 12 years ago by ches
Obviously there's no real crytpo here -- use this for cases like regenerating and emailing a user password.
1 84 posted 12 years ago by ches
Leave off the final pipe to /bin/sh to do a 'dry run'
3 133 posted 12 years ago by ches
model/form.py is a good place to put schemata in a pylons app: easy to build with inheritance and accessible to controllers via model.form.EmailForm, etc. See the link for further info on the _extra_fields options -- this one is intended for just two...
1 119 posted 12 years ago by ches
like PHP's 'jS'
0 172 posted 12 years ago by ches
Build URLs for subcategories, e.g. 'cat-child-support.html' becomes '/family-law/child-support/'
0 71 posted 12 years ago by ches
« Prev 1 Next »