If you ever find yourself cursing about an ORA-01652: unable to extend temp segment by 128 in tablespace TEMP at 11 PM on your birthday, this article might be just the thing for you.
Back to flipping out...
The Home for People Who Like to Flip Out and Write Code
If you ever find yourself cursing about an ORA-01652: unable to extend temp segment by 128 in tablespace TEMP at 11 PM on your birthday, this article might be just the thing for you.
Back to flipping out...
Posted by
Hank Gay
at
23:37
View Comments
Labels: Oracle, sneak_attack
Handy article on scrolling with screen, which I use rarely enough that I always need to look this up.
Back to flipping out...
Posted by
Hank Gay
at
11:28
View Comments
Labels: screen, sneak_attack
Nifty post on reducing boilerplate and improving argument parsing in Django management commands.
Back to flipping out...
Posted by
Hank Gay
at
10:58
View Comments
Labels: django, python, sneak_attack
distutils
If you've seen some of the discussions surrounding Distribute (a fork of PJE's Setuptools), you may be wondering about distutils, the backbone of both Distribute and Setuptools. If you are, then you may have noticed that it's easier to find details on the various tools built on top of it than it is to find info on the basics, even though distutils is in the standard library.
Here are some of the resources I found useful:
distutils as it currently stands, without any of the various PEPs that have been discussed/proposed.setup function.distutils tutorial on the Python wikiOne thing to remember: the package_data and data_files keyword arguments to setup in setup.py tell the installer what to install, MANIFEST.in tells the packager what to include in the distribution file. Even if it seems duplicative, you need to make sure your resources show up in both places if you want to be able to use python setup.py install using the distribution you build using python setup.py sdist.
After you package up your program, you can see if your setup.py is correct by doing a test install in a virtualenv. This let's you make sure you can python setup.py install etc. without contaminating your global site packages. If you haven't heard about virtualenv, I recommend reading up on it; it's really handy. The first page of Google results is a good starting point.
Back to flipping out...
Posted by
Hank Gay
at
13:53
View Comments
Nice intro to debugging in Python using pdb.
Back to flipping out...
Posted by
Hank Gay
at
15:49
View Comments
Labels: debugging, python, sneak_attack
gitosis is a wrapper around git that makes it easier share repositories, especially as it relates to managing access rights.
The benefit that made me check it out is that I don't have to create an account on my dev machine for every single developer to whom I'd like to give access to some of my git repos.
export PATH=/opt/local/bin:/opt/local/sbin:/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin/:$PATH
export MANPATH=/opt/local/share/man:$MANPATH
Add yourself as an admin (member of the gitosis-admin group) by executing sudo -H -u git gitosis-init < ~/.ssh/id_dsa.pub. This will use your public key as input into gitosis-init and set you up as an admin.
Try git clone git@`$HOST`:gitosis-admin.git. It should work. If it doesn't, and complains about the other end unexpectedly hanging up, the $PATH for git is probably misconfigured. Make sure you configured .bashrc, because .bash_profile won't stick around.
You make configuration changes to gitosis by editing your local clone of gitosis-admin and FIXME kbd pushing them back. Let's add a new repo.
[group fabfour]
members = john paul george ringo
writable = the_monkeys_are_hacks
[group fabfour]
We're defining a new group, named fabfour.
members = john paul george ringo
Adding john, paul, george, ringo as members of the fabfour group.
writable = the_monkeys_are_hacks
Listing the_monkeys_are_hacks as the only writable repo for the fabfour group. In case you're saying "Wait, I don't have a the_monkeys_are_hacks repo!" don't worry, that's coming next. You have to do all of this before you try to push anything to gitosis.
Add your new gitosis-managed repo as a remote; inside your repo, execute git remote add origin git@`$HOST`:the_monkeys_are_hacks.git
Push to it; inside your repo, execute git push origin master:refs/heads/master
If the last step fails with an inscrutable error, there's a good chance you forgot to chmod the post-update hook.
Before john, paul, george, or ringo can actually get into the server, you need to add their public keys under gitosis-admin/keydir. I'm going to wave my hands concerning how you get the public keys, but they need to be added to gitosis-admin/keydir and they need to be named using the convention username.pub, so we'd have:
Back to flipping out...
Posted by
Hank Gay
at
17:34
View Comments
Ever get that feeling that there just has to be something built right into the shell that will solve the problem you're facing, but have no idea what that something might be? Enter apropos. It searches the man page blurbs for entries that match your keywords, which can be regular expressions. How is it that more people don't talk about features like this?
Back to flipping out...
Posted by
Hank Gay
at
22:40
View Comments
Labels: note-to-self, unix