Django — django.contrib.auth Login Issues: Site._meta.installed / Site matching query does not exist

Well, I wondered what happened here and googling was futile.

Was getting errors on django.contrb.auth.views.login

If Site._meta.installed:
current_site = Site.objects.get_current()

After reading into what that does, it pulls SITE_ID out of your settings to check what db to look into. Well, my django project had a SITE_ID of 2 from many months ago.

Simply changed that to one and problem fixed.

Ubuntu — Running Two Firefox Intances on Dual Screen (Seprate X Screen — not LargeDesktop or TwinView)

There are benefits and downsides to using separate X screens for dual screen setups vs a “large desktop” which just means the computer thinks there is one desktop, with two monitors showing the same desktop.

Separate X screens means you have an entirely different screen on each monitor. This is useful to me because I can have two SETS of workspaces on each screen. My smaller monitor to the left has 3 workspaces, the large 30″ on the right has 6 screens. I keep my browser, chat, music on the left monitor, and it doesn’t move no matter how much I switch around on my main screen.

With a large desktop or TwinView, you would switch both screens by switching workspaces. So having that second screen doesn’t help THAT much if you already have a large main screen as you’d still need to switch around just to look on your second screen.

Anyways, FireFox complains that you an instance is already running if you try to run firefox on each screen. To get around the problem, start firefox with -P, which runs the profile selector.

Create a new profile and there you go, you have a new firefox instance running on your other screen.

From now on, just start firefox by running firefox -P.

SVN — Compare Working Copy to a Specific Revision

To get a diff of a specific file and a specific revision of that file,
svn diff -r REVISION_NUMBER PATH

To compare a specific revision to another specific revision (instead of your working copy) enter:
svn diff -r REVISION_NUMBER SECOND_REVISION_NUMBER PATH

It definitely helps to do a straight forward grep to see only additions of subtractions:
svn diff blah | grep ^+ & svn diff blah | grep ^-

SVN — Access Specific Revision From Web Browser

Say you have a fresh install of SVN working. You want a no hassle, built in way to view other revisions on your browser…

I found this solution online googling:
http://YOUR_SVN_REPO_ROOT/!svn/bc/4/

The above shows all repositories at revision 4.

So http://YOUR_SVN/!svn/bc/4/YOUR_REPO/REGULAR_DIRECTORY_STRUCTURE

Will take you wherever you’d like.

I’ll learn how to actually use SVN some time in the future. For now, this will do.

Bash — svn rm on all matching files

I’ll need this in the future. I needed to do “svn rm” on each instance of something.pyc to remove it from the respository.

Found the solution online (sort of).

find -name "*.pyc" is the obvious part.

find -name "*.pyc" -exec svn rm {} \;

will erase all files ending in .pyc via svn rm.

Alternatively, you can also use something like

find -name "*.pyc" | xargs svn rm

kylefox below says that he needed to specify the path, which would be for current directory find . -name “*.pyc” -exec svn rm {} \;

Priming the brain with a Cold or Hot drink.

Priming is the effect of random things on our perception of everything else.

If we watch a movie where somebody is acting brave, you will see other people as more brave than if you had not seen that movie.

It is similar to framing, whereby politicians refer to tax cuts vs tax releif. Call them tax releif and you presume somebody is against “releiving” taxes.

This example was astonishing because the test involved handing somebody a cold or warm drink before interviewing somebody & asking them questions such as whether they trust them, would hire them, etc.

So, on the way up to the interviewing room, the examiner asks the volunteer to hold his drink. If it is warm, the volunteers all rate the interviewee higher. They would have him lead a company, they trust him, etc.

Given the cold drink in the elevator, they all rate him poorly. The interviewee doesn’t fit as a leader, they don’t trust him, etc.

Amazing? Makes sense, but I’d like to carry out this experiment myself one day because it seems utterly too powerful.

Entering a warm store in the cold weather is certainly an amazing feeling, and that cozy feeling is unmistakably powerful, but does touching a drink have that much of an effect? It just might.

Post Rationalizing: Justifying a choice after the fact.

This research has huge implications for business marketing. I’m certain the best marketing companies dig into this stuff.

Justifying a choice after the fact is nice and all & we’ve been told it happens, but how about a concrete, reproducible experiment?

Here it is:

Have volunteers play a little game. They are shown two pictures of the opposing sex that look similar. When asked which one they are more attracted to, they pick one.

Heres the kicker:

When the volunteer picks the picture on the right, the examiner gives them the OTHER picture. The one they DIDNT pick. When asked to justify their decision, they LOOK at the picture (that actually isn’t the one they picked) and start listing off things like: “I’m a photographer and I like how this one is framed”, “seems nicer” etc.

80% of participants don’t notice that the pictures have been switched. That is amazing!

You look at two pictures. You think one looks nicer than the other. You’ve decided on that and pick one face. The examiner gives you the picture you DIDNT pick, and when you look at that picture, you start listing off reasons why that picture is better than the other one.

Adobe Reader 8.12 — Can not print multiple copies

How ridiculous is this? The most recent release of adobe reader has a bug in it that doesn’t let you print multiple copies of a file to ANY printer. The software simply doesn’t sends the copies parameter to the printer.

Adobe’s response? It will be fixed in the next release. Not fixed in an emergency patch that will be done NOW?

I’m spamming ctrl + p right now because I need 60 copies. I’ll settle for 15.

ATi vs Nvidia Graphics Card Giants. Genius Marketing.

These guys are the two heavy hitters in modern day graphics cards. The cards that run 3D simulations like video games, autoCAD, 3D modeling, and all that jazz.

These two companies have GENIUS marketing. They have been sued and fined over price fixing whereby the two companies agree on pricing schemes to sell their products better.

It just occured to me today as I looked for a cheaper graphics card that their pricing and model numbers are absolute genius.

Take the 8800GTX. This baby was $600 when I bought it last year. It is now something like $300.

The 8800GTS is out, which is a much slower card. Then the 8800GT came out, which is actually faster than the 8800GTS.

Finally, the newest generations numbers are always a new thousand digit (like 6000, 7000, 8000, 9000) and we have been introduced to the 9 series.

But this is the genius part: They ALWAYS do this:

There are always the new “9 series” like the 9600GT. the 9500.

It makes people think they are better than the older 8800 series but they are not. A 8800GT outpreforms the 9600GT and 9500 any day. So this genius marketing is that they always leave you confused, especially those who haven’t learned to use the internet for unbiased reviews (takes digging).

Its just amazing marketing. 90% of people out there know nothing, and this is who they market to.

Here is how a typical graphics card description sounds:
“The latest technlogy lets you run any game at max resolution!”

It’s a load of crap. But genius marketnig. To what extent are Nvidia and ATI partnering I wonder? Who says that last price fixing wasn’t the end? Perhaps these cards are put on the market much higher than they really should be?

Price fixing by the only 2 chipmakers in the marketplace would be utterly effective. You could inflate the price of these parts and nobody would have any idea. The “top of the line” would still be the top of the line via controlled competition. I wonder if that price fixing scandal was the end of it.