September 26, 2011, 9:32 pm
Here are the solutions to a few annoying things that caused issues when I was installing Python, Django, and MySQL on a new Windows 7 64-bit laptop.
1. Be sure to set your PYTHONPATH variable.
After I installed ActiveState Python, it didn't set up the environmental variable. I added it and restarted the command window, and voilà. (I don't remember having to set that up manually on my XP machine, but I could be mistaken since it's been a very long since I installed everything on that machine. Regardless, it's a good thing to check. *g* Also check your PATH variable, to make sure that Python, Django, and MySQL are all in there.)
2. Assign the read_default_file setting in the database dictionary.
I was getting "Error 2003: Can't connect to MySQL server on 'localhost' (10061)." It wasn't the firewall blocking the port, because mysql is running on a socket. (Though I could be wrong, as I just switched over to Codomo from ZoneAlarm, which had issues with Win7 64-bit and Filezilla, and I haven't learned all of Codomo's quirks yet, so who knows?) Even though I've got the admin service set up to execute "C:\progs\mysql\bin\mysqld" --defaults-file="C:\progs\mysql\my.ini" MySQL, it still wasn't finding the ini file for some reason. Weirdly, telling Django which my.ini file to run MySQL with fixed it. In your settings.py, in the database section, you'll add the OPTIONS entry:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'database_name',
'USER': 'username',
'PASSWORD': 'password',
'HOST': '',
'PORT': '',
'OPTIONS': {
'read_default_file': 'c:\path\to\your\my.ini',
},
}
}
June 21, 2011, 2:33 pm
Finally found the info I needed in the ffmpeg docs to keep the ID3 tags when converting from flac to mp3:
for FILE in *.flac;
do
ffmpeg -i "$FILE" -ab 320k -map_meta_data 0:0 "${FILE%.*}.mp3";
done
May 5, 2011, 1:13 am
You spend half an hour talking to a complete stranger in the grocery store.
Granted, I now know the best kind of fish sauce to buy, but still, my trip to the Asian Pacific Market today was quite entertaining. *vbg*
* "Westerner" just doesn't have the same ring, even though Colorado's not really Midwestern, you know?
April 27, 2011, 9:08 pm
The question every young writer asks is: "What should I write?"
And the cliched answer is, "Write what you know."
This advice always leads to terrible stories in which nothing interesting happens.
The best advice is not to write what you know, it's write what you *like*.
Write the kind of story you like best.
We make art because we like art.
All fiction, in fact, is fan fiction.
The best way to find the work you should be doing is to think about the work you want to see done that isn't being done, and then go do it.
Draw the art you want to see, make the music you want to hear, write the books you want to read.
How To Steal Like An Artist (And 9 Other Things Nobody Told Me) by Austin Kleon
April 25, 2011, 1:35 pm
The Future of Books by James Warner
2080: A Golden Age of Informational Fluidity.
For the benefit of those people at future-of-publishing panels—there's always one, for some reason—who insist it's really not about the text but the smell of the book, books will by this time be available exclusively as lines of fragrances. Subsequently, humans will modify themselves into a species with a powerful olfactory sense, able to read underwater by decoding strings of pheronomes. Aroma-bibliography will triumph, as vast epics are composed for newly developed scent receptors, transforming the rising seas into a giant bath of community-assisted transmedia content. Also around this time, the oral literature of dolphins will be deciphered and will turn out, inexplicably, to be all about vampires.