Archive for April, 2007

Mini Searches with Answers

Friday, April 13th, 2007

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.

Fixing: Can’t insert rows into a MySQL table
I was having this problem on my Nearly Free Speech account. It turns out that adding the line:
connection.autocommit(True)
worked for me.

"Terminal Here" script for Ubuntu
Save this a file in your ~/.gnome2/nautilus-scripts/ directory and make it executable. And then you can click anywhere in a folder and open a terminal already in that directory. Yay!

EJSChart – 100% Pure JavaScript Charting Solution
Make charts with only javascript. I can’t tell if it’s free though.

What is the best credit card processing setup for startups?
Has some good advice from small business owners on what credit card processors to use. The concensus points to Paypal or Google Checkout at least to start with.

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

Mini Searches with Answers

Saturday, April 7th, 2007

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

Finally, Python Decorators are Explained!
Here’s the best explanation of decorators I’ve seen so far. I think I’ve resisted understanding them up to now because I didn’t like the syntax. Once I accepted that putting @something above a function definition does something special, I understood.

Unendliche Geschichte, Die (1984)
Why isn’t “The Never Ending Story” in the IMDB? Well, it is, it’s here, just in German for some reason. If you know why please leave a comment

Lightbox 2 Wordpress Plugin ? 4MJ
Aye, there is a WordPress plugin for the lightbox technology. I hope it works when I try it in a month.

ImgRed.com – Image Redirection
This looks cool but I wonder how reliable it is? I can’t explain so go check it out and come back :-)
I think it would be could to make a script so your own server would do this. It is tedious to save, upload, and then link to an image.

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

How to Access MySQL on the Command Line on GrokThis

Tuesday, April 3rd, 2007

mysql -u USERNAME -p -S /var/run/mysql/5.0/mysqld.sock

And more generally if you try to run mysql on anyone’s command line and it gives you an error mentioning a socket, like this perhaps:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)

Try running this command to find out the correct socket:
ps -ef | grep mysql

It will return some junk like this below and you can see at the end there, it tells you where your socket is.

root 23092 1 0 Jan18 ? 00:00:00 /bin/sh ./bin/mysqld_safe
mysql 23113 23092 0 Jan18 ? 00:06:12 /usr/local/mysql/vfs/5.0/bin/mysqld --defaults-extra-file=/usr/local/mysql/vfs/5.0/data/my.cnf --basedir=/usr/local/mysql/vfs/5.0 --datadir=/usr/local/mysql/vfs/5.0/data --user=mysql --pid-file=/usr/local/mysql/vfs/5.0/data/village2.pid --skip-external-locking --socket=/var/run/mysql/5.0/mysqld.sock