ERROR invalid reference to FROM-clause
I was receiving this error:
ERROR: invalid reference to FROM-clause entry for table “mailboxer_conversations” LINE 3: … ON “mailboxer_notifications”.”conversation_id” = “mailboxer… ^ HINT: There is an entry for table “mailboxer_conversations”, but it cannot be referenced from this part of the query.
Because I had a query like this:
Fixed it by rewriting the query like this:
git diff when you have a file with the same name as a branch
Let’s say you have a file called potato, and a branch called potato. If you want to see a diff against the branch called potato you’d run this:
If you want to see a diff of the file potato:
sed regex replace backreference example
I had a file containing something like this:
and I wanted to turn it into a shell script that would export those vars. This comes pretty close to it, and shows an example of using replace using sed backreferences:
launch an editor to write/edit a shell command
If you have a long command that you want to modify, hold Ctrl-X and press e. This will open the editor specified with $EDITOR, and you can write it there.
finding git branches that contain a commit
Information found here:
and to find only local ones:
creating and debugging mongo indexes
To check index usage, start your mongod with -vv flags, example:
And then cat your logfile, probably in this location:
Look for the nscanned and nscannedObjects fields.
iframe, cookies and IE
If you need to accept cookies from inside an iframe with IE, you need to set the P3P header: P3P: CP=”whatever P3P keywords”
or
P3P: CP=”we do not support P3P”
And this will make IE happy.