Mini Searches with Answers

September 16th, 2011  / Author: Greg Pinero (Primary Searcher)

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

Switch “origin” of your GIT repository « Dariusz Cieślak’s Blog on Software
I was trying to put my existing, cloned repository into github and I got this error:
$git remote add origin git@github.com:JaneliaSciComp/msg.git
fatal: remote origin already exists.

This page tells how you change your remote origin.

Pro Git – Table of Contents
This seems like a really good online git book.

Perl Warning WTF – Scalar value @t[7] better written as $t[7]
This page has the answer:

The problem is that @names[3] denotes an array slice — you can tell by the @. What you really want is $names[3], which is a true scalar

perl – How can variables be set to NULL under the strict pragma? – Stack Overflow
Fixing warning:
Bareword “null” not allowed while “strict subs” in use

My commentary:
Null isn’t real? The other tutorials said it was. Why is it allowed at all then?

perlintro – perldoc.perl.org
This seems like the best perl tutorial I’ve seen. It’s simple and to the point.

Tags: , , , , , , , , , , , ,

Mini Searches with Answers

August 30th, 2011  / Author: Greg Pinero (Primary Searcher)

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

‪Auto Repair: Install Power Window Switch Chevy Venture Pontiac Montana 97-05 – 1AAuto.com‬‏ – YouTube
My window switch got stuck on my Chevy venture. I forced it unstuck and now the window won’t go down.

gittutorial(7)
Seems like a pretty reasonable overview of doing a git clone and using git

DjangoResources – Django
This page lists open source projects and applications regarding Django, the framework for perfectionists with deadlines.

Easily packaging and distributing Django apps with setuptools and easy_install | Surfing in Kansas
I always figured it would be near impossible to distribute a Django app. I’ll see what this says though …

Tags: , , , , , , , , , , , , , , , ,

Mini Searches with Answers

August 28th, 2011  / Author: Greg Pinero (Primary Searcher)

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

Get the CSRF Middleware Token in a Django Template – Some code from stevelosh – Forrst
How to get your raw CSRF token in Django, e.g., when you’re creating a form outside of a template.

Django tips: Template context processors
How to make information available to every template.

Be sure to put in the default template processors first or you’ll overwrite them and exclude them e.g., for Django 1.3:

TEMPLATE_CONTEXT_PROCESSORS = (
“django.contrib.auth.context_processors.auth”,
“django.core.context_processors.debug”,
“django.core.context_processors.i18n”,
“django.core.context_processors.media”,
“django.core.context_processors.static”,
“django.contrib.messages.context_processors.messages”,
“MyApp.views.my_context_proc_func”,
)

The Architecture of Open Source Applications
A free book reviewing open source design

HTML EMAIL BOILERPLATE v 0.4 updated 5/12
Tips for writing HTML for emails so that they render correctly across clients.

module – Python: can’t install python-ldap – Stack Overflow
Good advice on fixing missing *.h issues when installing:

Missing headers are almost always a sign for missing -dev packages (sometimes also named -devel). Just do apt-cache search sasl | grep dev and you’ll probably find the right package

VMs moving between workspaces (View topic) • virtualbox.org
My virtualbox keeps moving between workspaces. It’s really annoying. I guess no one has an answer but this forum thread recognizes and complains about the problem at least.

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Mini Searches with Answers

August 28th, 2011  / Author: Greg Pinero (Primary Searcher)

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

South – Django database migration
Really easy way to keep your django models synced with the DB. I have tried it with version control yet though.

The Django Book: Version 2.0 (English)
Useful looking book. Good coverage of the Django admin site.

White Paper: Server External Authentication | FileMaker
This may be the only documentation on setting up FileMaker to authenticate against Active Directory (AD). But I don’t know for sure because the PDF is still downloading at 7KB/second …

Fill Any PDF Form
This worked really well for signing a PDF online without having to print it out, sign it, and scan it back in. I hate that!

Django | FAQ: Databases and models | Django documentation
How can I see the raw SQL queries Django is running?

How to tell SVN to ignore files from any directory in the project
I put the list of files/patterns I wanted to ignore in /tmp/ignore.txt

Then I ran this from the project root:
svn propset –recursive svn:ignore -F /tmp/ignore.txt .

Then you have to commit.

You can see properties using:
svn proplist –verbose

How to Install/set up Apache on RedHat
I guess it was already installed as “httpd”. I don’t know why it’s not called Apache.

How to install MySQLdb on Linux without a stupid Egg
>python setup.py install –single-version-externally-managed –record=/opt/python/source/weird_egg_thing

Django | QuerySet API reference | Django documentation
Use select related to minimize Django database queries.

Entry.objects.select_related().get(id=5)

Python Extension Packages for Windows – Christoph Gohlke
How to actually install MySQLDB on windows. That library is becoming more and more of an embarrassment for Python. Someone really needs to be providing a binary for Windows users on the actual site.

Tags: , , , , , , , , , , , , , , , , , , , , , , ,

fastq-dump – SRA Toolkit – table not found error – resolved

August 22nd, 2011  / Author: Greg Pinero (Primary Searcher)

I downloaded this file (SRR074287) and wanted to convert it to FASTQ format.

I downloaded the SRA toolkit and extracted it to a directory in my home directory. However when I tried to run it I got this error:

$ ~/sratoolkit.2.1.2-centos_linux64/fastq-dump -A SRR074287
2011-08-22T15:00:16 fastq-dump.2.1.2 err: table not found while opening manager within database module - failed to open 'SRR074287'

After some trial and error, running it like this seems to work:

$ ~/sratoolkit.2.1.2-centos_linux64/fastq-dump SRR074288.sra

There is some documentation here, but it didn’t really explain what I did wrong, or why running it with the filename works.