Friday, January 30, 2009

Fellow mathematicians...

If you stumble upon this page in the hopes of finding a way to add LaTeX capabilities to your blogger/blogspot posts, today is your lucky day. Well, your lucky day could have been back in March 2007 when wolverineX02 wrote his "LaTeX for blogger" script, but I have added the ability to UNDO the translated LaTeX code. Now if you wish to revise a formula, you don't have to wade through a lot of URL translation codes/rewrite your whole formula.

This script requires Firefox and the greasemonkey extension, both of which I highly recommend.
The only thing different from normal is that math must be enclosed in two dollars signs on each side instead of the one you're used to in your TeX compilers. $$\LaTeX$$ becomes :)

Interesting occurrence with 7th root of unity

PDF of this post
I've come across a property of that is rather interesting. Letting , we let , we will see that .

Instead of working directly with this difference, we square the expression for something more easily manipulated. . Using the equalities , etc., we can simplify this down to . Since the sum of the 7th roots of unity equals 0 and the sum only neglects the root , we see that . Thus . Amazing stuff, right?

Thursday, January 8, 2009

A bash script I wrote and love

I, like many Linux geeks before me, love to use the terminal for just about everything. However when I need to use programs with GUIs (Firefox, amarok, okular, etc), I wanted to execute them silently and to get them to return focus to the terminal. Normally if you type
$ firefox

You get a bunch of X and Gtk warnings during execution of Firefox, and you can't use that shell anymore. You have to open another tab in konsole. So, this script I wrote is called "sex" for "silent execute." Mainly for the brevity and the humor of having
$ sex dolphin

be a valid command. This script also allows parameters to be sent correctly to an executable, so
$ sex okular A\ document\ with\ spaces.pdf

opens "A document with spaces.pdf" in okular correctly.
CONCAT="${1}"; shift
for ARG in "$@"; do
eval "$CONCAT >> /dev/null 2>&1 &"

Simply put this in /usr/bin/sex (need root) and do a chmod +x /usr/bin/sex. I recommend adding
alias ff='sex firefox'

to your ~/.bashrc or your /etc/bash.bashrc too. It's a nice shortcut.