Nefaria.com

What Patton would have said…

by musashi on Sep.02, 2010, under General, Rants

Yesterday I received a chain-letter in my inbox. I’m not going to repost it here, but here’s a few links:

Link #1 (scroll down a bit)

Link #2

Anyway, I get quite a lot of chain-letters like this so it goes without saying that I don’t respond to all of them. However, sometimes I feel compelled to do so, depending on the content and/or the issue being “discussed” (I use that term lightly). This particular letter struck a nerve with me; it’s full of the usual nationalistic/fascist psychobabble — it’s obvious that it was written specifically for a certain subsection of American society.

*sigh* …

Anyway, here’s my response:

Indeed, this is a disgrace. But I think that this point needs clarification. The disgrace isn’t with the Muslim Americans who wish to exercise their right to religious freedom by building a mosque or community center on privately owned property; the disgrace is that some Americans are trying to deny other Americans from exercising that right.

This e-mail claims that the group who wants to build the mosque is an extremist group. However, by any realistic measure, this couldn’t be further from the truth. The proponents of this claim say that the leader of the group has ties to a man who supports extremism and funds madrasas(sp?), but notice how they never actually name this person.

Alwaleed bin Talal. This is the man they’re talking about. Who is he? For starters, he’s a Saudi prince, but that’s not as interesting as this next fact:

He is also the part owner (2nd largest shareholder) of News Corp, which is the parent company of Fox News — the main media outlet that has been relentlessly stirring the pot on the issue of the “terror mosque”.

So, either Fox News is funding terrorism via Alwaleed bin Talal, which means that Fox News is funding the construction of this “terror mosque” while simultaneously opposing it; or Fox News isn’t funding terrorism *and* the members of the group building the mosque are actually peaceful American Muslims just trying to exercise their right to practice their religion — a right guaranteed by the Constitution — in the face of immense xenophobia and ignorance on behalf of everyone opposed to the building of the mosque.

But “what about this radical Imam?” you might be asking. Oh you mean Imam Feisal Abdul Rauf; the same guy who has been working with the U.S. State Department (since the Bush administration) to promote religious tolerance in the Arab world.

Read that again.

The Imam — the leader of the group building the “terror mosque”, worked with the U.S. State Department on at least two separate occasions in 2007 and is currently working with the State Department to promote religious tolerance amongst Muslims.

…Some “radical” he surely is.

By now a few things should be painfully obvious:

(1) The Muslim group building the mosque is not a collection of terrorists, extremists, America-haters, etc.

(2) Fox News is keeping this non-issue going because it’s good for ratings.

(3) Opponents of the mosque actually have no valid reason to oppose it, all of the “reasons” they have can be attributed to not knowing the details of the situation (mentioned previously), xenophobia (i.e., fear of people of other races/nationalities/religions), racism, politically or religiously-motivated hatred of Muslims, or just plain stupidity.

Again, I find it absolutely disgusting that any American would work to restrict the rights of another American, while claiming this to be his or her “patriotic duty”. There is no greater enemy to the United States than this fever of ultra-nationalism that gripped our nation around the throat… we truly are on the road to fascism. Let me put it this way: There is nothing “patriotic” or “American” about ignorantly laboring to limit the Constitutionally protected rights of fellow Americans just because their religion or even their politics disagree with yours.

I also think it’s worth repeating that on 9/11, it wasn’t just Christians who died when the twin towers fell. Within the walls of the WTC buildings, many people of different races, nationalities, and religions carried out their daily routines — Christians, Muslims, Jews, Buddhists, Baha’is, etc., all died in the attack.

…and one more thing

The despicable acts committed at Abu Garib were atrocities, and Iraq had absolutely nothing to do with the 9/11 attacks so attempting to justify them by invoking 9/11 is either disingenuous or ignorant… or both. Also, two wrongs don’t make a right.

###

But maybe General Patton would have something to say about the current state of our nation…

I wonder if he would question the wisdom of fighting a virtually un-winnable war on two fronts — one of those war fronts being a product of deception, corruption, and outright lies on behalf of the Bush administration… I wonder if he’d question the integrity of the leaders who started war in Iraq and then let their corporate pals practically rape the treasury department in the form of charging the government and the taxpayers exorbitant bills for sub-par or completely nonexistent services…

I wonder if he would be proud that half a century after WWII, the citizens of his homeland have forgotten the lessons of the Weimar Republic and the Nazis, and instead are happily marching down the road to fascism themselves…

I wonder if he would be proud that our politicians have embraced fearmongering as a means of controlling the populace…

Somehow, I doubt it.

But in the end it doesn’t really matter because he’s not around to comment on current events, so any speculation about what he may or may not have said is completely pointless. Whomever wrote this e-mail, claiming to know what Patton would have said, has no way of knowing if he or she were right, so it might just be a good idea to ignore useless drivel like this rather than forward it on to others.

In closing, I’d like to issue a challenge:

If you claim to be a patriot, educate yourself about what the Constitution and other founding documents *really* say. Don’t just continue believing in a rosy interpretation of what you imagine them to mean just because it fits your biases, politics, prejudices, etc. Recognize that ALL citizens of this great nation deserve the same rights as guaranteed by the Constitution. There are no “privileged” classes based on race, gender, religion, political beliefs, or sexual orientation — under the laws of our secular government, we are all equals. And if you really, really think that you’re a patriot, read the following excerpt from William N. Grigg, and then take a hard look around you. Take a hard look at what this nation has become. Take a hard look at what YOU have become… and then do something about it.

Quote:

While the terms patriotism and nationalism can refer to the same thing — the love of one’s native country — in practice they have acquired very different meanings. Nationalism, in practice, describes not to the love of a country but rather the veneration of its central government.

As historian John J. Dwyer notes, nationalism is a degenerate impostor of patriotism. “The patriot says, `I love my country,’ works for its good, and defends it if necessary — against enemies within and without,” writes Dwyer. “He strives and prays not primarily that God will bless his country, but that his country will bless God. The nationalist, meanwhile, says, `My country is better than yours.’ `My country is the greatest there has ever been.’ `The greatest nation on God’s green earth.’ `They hate my country because it is so good.’”

Nationalism focuses on the State, rather than the community. It is unambiguously based on zero-sum assumptions about power, and nationalists define victory in terms of imposing their will on others.

Source:

http://freedominourtime.blogspot.com/2007/03/patriotism-vs-nationalism.html

###

Sincerely,

Charles Hamilton
U.S. Army Iraq War Veteran (2003)

Leave a Comment : more...

Solution for: “Microsoft office has stopped working” (applies to Office 2007 & 2010)

by musashi on Aug.18, 2010, under I.T.

Symptoms: Microsoft word/excel/powerpoint/etc. crash a few seconds after being opened with the error message:

“Microsoft office has stopped working”

As a few clients of mine have upgraded to MS Office 2010, this problem has appeared a few times and it seems damn near impossible to fix… but there is a fix. You ready?

Set your default printer to the “Microsoft XPS Document Writer”.

I don’t know why this works, but it’s going to have to do until M$ releases and update/patch/fix/etc.

Leave a Comment : more...

jqueryFileTree connector script for python cgi

by musashi on Aug.10, 2010, under General, I.T.

If you use jquery and haven’t messed with the jqueryFileTree plugin, I’d highly recommend you do so. It’s pretty neat, and there are connector scripts already written in various languages for use with this plugin. However, there wasn’t one for python cgi (there was one for django however). So, I wrote my own! Try it out:

#!/usr/bin/python

#   jqueryFileTree connector script for python cgi  
#   Version: 1.0 / 10 August 2010
#   Author: Charles Hamilton / musashi@nefaria.com
#   Released under the GNU GPLv3
#   Modifications and improvements are welcome (and encouraged!)

import os, cgi, cgitb, urllib
cgitb.enable()
form = cgi.FieldStorage()

print ’Content-Type: text/html\n\n
print ’<ul class="jqueryFileTree" style="display: none;">

path = urllib.unquote(form['dir'].value)

dirs = []
files = []

filelist = sorted(os.listdir(path))

for object in filelist:
    if os.path.isfile(path + ‘/‘ + object):
        ext = os.path.splitext(path + ‘/‘ + object)
        files.append(‘<li class="file ext_‘ + ext[1] + ‘"><a href="#" rel="‘+ path + object + ‘">‘+ object + ‘</a></li>‘)
    elif os.path.isdir(path + ‘/‘ + object):
        dirs.append(‘<li class="directory collapsed"><a href="#" rel="‘+ path + object +’/">‘ + object + ‘</a></li>‘)

for d in dirs:
    print d

for f in files:
    print f

print ’</ul>

Leave a Comment :, , , , more...

Python + Reportlab: example #1

by musashi on Aug.05, 2010, under General, I.T.

So I’ve been using reportlab lately and I have to say, it’s pretty neat. This post will (hopefully) be the first of many to follow. It’s just a simple example that shows how to take input from a web form and insert it into a PDF. First, the code:

 1 #!/usr/bin/python
 2
 3 import cgi, sys
 4
 5 form = cgi.FieldStorage()
 6
 7 if not "namein form:
 8     print """Content-Type: text/html\n\n
 9 <html>
10     <head>
11         <title>Reportlab Example</title>
12     </head>
13     <body>
14         <form action="index2.cgi" method="post" enctype="multipart/form-data">
15             <fieldset>
16                 <legend>Personal Info:</legend>
17                 Name: <input type="text" name="name"><br />
18                 Photo: <input type="file" name="photo"><br />
19                 <input type="submit">
20             </fieldset>
21         </form>
22     </body>
23 </head>"""
24
25 else:
26
27     from reportlab.platypus import *
28     from reportlab.lib.styles import getSampleStyleSheet
29     from reportlab.lib.units import inch
30     from reportlab.lib import colors
31     doc = SimpleDocTemplate(sys.stdout)
32     styles = getSampleStyleSheet()
33     content = []
34     
35     if form['photo'].filename:
36         image = Image(form['photo'].file)
37         image.drawHeight = 2*inch*image.drawHeight / image.drawWidth
38         image.drawWidth = 2*inch
39
40     if form['name'].value:
41         text1 = Paragraph(form['name'].value, styles['Heading1'])
42         text2 = Paragraph(form['name'].value, styles['Heading2'])
43         text3 = Paragraph(form['name'].value, styles['Heading3'])
44
45     content.append(text1)
46     content.append(text2)
47     content.append(text3)
48     content.append(image)
49     print "Content-Type: application/pdf"
50     print "Content-Disposition: attachment; filename=example.pdf\n\n"
51     doc.build(content)

Now the explanation:

Lines #1 – #5 handle specifying the interpreter, importing modules, and initializing the “FieldStorage” dictionary (as the variable ‘form’).

 1 #!/usr/bin/python
 2
 3 import cgi, sys
 4
 5 form = cgi.FieldStorage()

Line #7 tests whether the form has been submitted by checking to see if the ‘name’ field has been filled out. There’s many better ways to test for form submission, but for the purposes of our example, this will work just fine.

 7 if not "namein form:

Lines #8 – #23 print the form

 8     print """Content-Type: text/html\n\n
 9 <html>
10     <head>
11         <title>Reportlab Example</title>
12     </head>
13     <body>
14         <form action="index2.cgi" method="post" enctype="multipart/form-data">
15             <fieldset>
16                 <legend>Personal Info:</legend>
17                 Name: <input type="text" name="name"><br />
18                 Photo: <input type="file" name="photo"><br />
19                 <input type="submit">
20             </fieldset>
21         </form>
22     </body>
23 </head>"""

Lines #26 – #29 import some more modules (i.e., reportlab related stuff).

26     from reportlab.platypus import *
27     from reportlab.lib.styles import getSampleStyleSheet
28     from reportlab.lib.units import inch
29     from reportlab.lib import colors

Now line #30 is important, this is where we decide where we want to write the output. We can either save the output to a file, or we can dump it to stdout (i.e., back to the web browser). In this example, we’re going to send the output back to the web browser.

30     doc = SimpleDocTemplate(sys.stdout)

Line #31 handles getting the style sheet that we’re going to use to format our text.

31     styles = getSampleStyleSheet()

In line #32, we initialize the ‘content’ dictionary — this is where we’re going to keep the elements of our PDF until we’re ready to write it to stdout.

32     content = []

In lines #34 – #37, we test for the ‘photo’ field — if it has been submitted, we create an Image object out of it. We’re assuming that the user is going to submit a photo, but in reality, the user could submit anything so some further “hardening” of this form would be required in order to ensure that the only things that actually get submitted are image files.

34     if form['photo'].filename:
35         image = Image(form['photo'].file)
36         image.drawHeight = 2*inch*image.drawHeight / image.drawWidth
37         image.drawWidth = 2*inch

Lines #39 – #42 test to see if the ‘name’ field has been submitted; if it has, it creates some text objects to insert into our PDF.

39     if form['name'].value:
40         text1 = Paragraph(form['name'].value, styles['Heading1'])
41         text2 = Paragraph(form['name'].value, styles['Heading2'])
42         text3 = Paragraph(form['name'].value, styles['Heading3'])

Lines #44 – #47 append all the objects that we want to appear in our PDF, to the ‘content’ dictionary we created earlier.

44     content.append(text1)
45     content.append(text2)
46     content.append(text3)
47     content.append(image)

Lines #48 – #49 send the appropriate headers to the web browser, before we send our completed PDF file.

48     print "Content-Type: application/pdf"
49     print "Content-Disposition: attachment; filename=example.pdf\n\n"

And finally, line #50 builds our PDF and sends the output to stdout.

50     doc.build(content)

Test it out; you should end up with a PDF that looks something like this:

reportlab_example1_img1

Of course, this example doesn’t even scratch the surface of what you can do with reportlab. Hopefully I’ll post some more examples later on :-)

Leave a Comment :, more...

H.CON.RES.274: ‘Reaffirming “In God We Trust” as the official motto of the United States and supporting and encouraging the public display of the national motto in all public buildings, public schools, and other government institutions.’

by musashi on Jul.07, 2010, under General, Rants

I sent a letter to my congressman this morning regarding this resolution*; those of like mind are encouraged to do the same. Here’s what I said:

Rep. Van Hollen,

I’m writing to you because I’d like to know your stance on H.CON.RES.274; a house resolution titled:

‘Reaffirming “In God We Trust” as the official motto of the United States and supporting and encouraging the public display of the national motto in all public buildings, public schools, and other government institutions.’

But before we get to that, I’d like to point out that (as you are probably well aware) this resolution is highly unconstitutional. “In God We Trust” and “One Nation Under God” are remnants of McCarthyism — a dark period in our nation’s history where the lives of many innocent people were needlessly destroyed in a storm of nationalist fervor. Proponents of this resolution will argue that since these mottoes make no reference to any specific religion, they don’t exclude anyone. But this is poor logic at best. In order to believe that, you’d have to believe that everyone in the U.S. believes in a god of some sort, which is definitely not the case.

This resolution also has the effect of reaffirming the myth that the U.S. was founded upon “Christian” values/ideals and was intended by the founding fathers to be a “Christian” nation. History is full of evidence to the contrary — the “Treaty of Tripoli” for example, explicitly states that the U.S. is not ‘in any sense’ founded upon the Christian religion. However modern day revisionists are doing their best to push this myth down the collective throat of the public.

I’m sure that you’re aware of what is going on in Texas currently; Religious zealots have taken over the school board and are pushing for a curriculum that marginalizes the civil rights movement, evolution, Thomas Jefferson; attempts to whitewash the less-savory parts of American history (e.g., the near-extinction of native Americans, slavery, McCarthyism, etc.) And — this is the worst part — furthers the misguided idea known as “American Exceptionalism”. This is the idea that the U.S. is somehow special; that we are immune to the ills that plague other nations because we have been chosen by God to be an example for other nations to emulate. This idea is extremely self-serving and jingoistic. It breeds arrogance and an attitude that the U.S. is the only relevant nation in the world — we can do whatever we want, invade anyone we want, we are accountable to nobody. In effect, this idea has turned us into the world’s bully.

You don’t have to look too far to see that we’re on a dangerous path towards fascism. Today, a large portion of Americans have forgotten the difference between patriotism (e.g., dissent, honesty, civil discourse) and nationalism (e.g., blind adherence to an idealized version of our nation, demonization of unpopular speech and the people doing the speaking). These same Americans wear their ignorance as a badge of honor — they harbor contempt for people who disagree in the slightest sense, and they’re willing to do violence to further their “cause”. They have absolutely no regard for the rights of those whose beliefs conflict with their own; indeed, the spread of eliminationist rhetoric by conservative media outlets has had the effect of dehumanizing anyone who doesn’t see things their way. When politicians speak of “True Americans(tm)” as if some of us are lesser citizens, we should all be worried because we’ve heard this sort of rhetoric in the past and we know exactly what it leads to… in case this isn’t clear enough, I’m talking about Germany in the 1930′s.

I’m pleading with you as a concerned citizen and a veteran of the U.S. Army who served his country in Iraq — a veteran who knows all too well what the current climate of ignorance, fearmongering, lies, religious zealotry, and propaganda has done to his country… please, do not support this resolution, or even better, do everything within your power to kill it outright. We need not reaffirm this myth! Doing so is only adding more fuel to the fire. Those who worship at the altar of nationalistic religious fascism will only use it as a weapon against their fellow citizens.

Thank you.

Charles E. Hamilton III

I’ll post the response (I’ve e-mailed Rep. Van Hollen in the past; he usually responds) when I get it.

Thanks for reading!

*Correction; this is a resolution and not a bill. The original letter uses the term ‘bill’.

14 Comments : more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...