Memorial Day?
Societally, Memorial Day is about camping and cookouts. It doesn't really have anything to do with military service or fallen troops. Of course it does to those directly impacted by those things -- just as surely some modest handful of Christians out there still refuse to white wash Christmas with the image of a jolly, gift-giving, fat man. But, demographically speaking, veterans and their survivors can't rival the volume of those of us untouched who 'honor their memory' by getting half-naked, building a bonfire, and tapping a keg.
And who's to blame this generation - my generation - for our lack of reverence? The last noble war was fought long before we graced the glimmer of our parent's eyes. Every 'conflict' since has been an exercise in Rich White Colonials v. Poor People Defending their Homes. At least in Vietnam we could honor the men who had no choice; who were drafted and forced into service. We could at least imagine that these young boys didn't really want to go to the other side of the planet and needlessly kill people on Uncle Sam's dime.
But in this post-Vietnam, draft-less era we find it hard to see any reason to hand military servicemen any special honors. "They put their lives on the line..." sure, but for what?
We're all big boys here. We know that the greatest lot of our troops wouldn't have signed up if their Uncle Sam wasn't handing out scholarships like sucking candy. Uncle Sam sure knows it! Otherwise he wouldn't focus his recruiting efforts so heavily in the projects and the ghettos. He'd be sending his recruiters door to door in gated suburban communities, instead of trailer to trailer in mobile home parks. So let's not pretend that the modern American soldier is a noble-hearted patriot, selflessly protecting the nation they hold so dear. Most joined up as way out of the poverty stricken lives their nation placed them into, and most had their fingers crossed that they'd never need to defend anything in actual combat.
But I have some sympathy for - perhaps I can even respect - the man who knowingly sells himself at auction to escape the cycle of debt, poverty, and slavery holding him in a generational vice. Still, I wouldn't give him a day to celebrate it. I wouldn't fain his to be an act of virtuous nobility. I wouldn't want to confuse him; nor let him forget at any time that his service was meant as a means to an end; That becoming a murderer for hire - even out of necessity - is something to be looked back upon with regret, not championed, nor made into a career.
After all, that's what this generation's military is: an army of mercenaries. They don't prevent genocides or overthrow oppressive regimes anymore. They aren't safe-guarding American soil or protecting any uniquely American 'way of life.' It's about the resources. It's about the oil. It's about the money. That's where and why they kill. So we can't really count them as American soldiers. They're NASDAQ soldiers. And that makes them mercenaries.
You can understand, having watched the passed three decades of this American military's operations why my generation might say, "Memorial Day? Crack me open a brew and bring out the Johnsonville Brats!" We just can't find it in ourselves to truly honor this Army; this Goliath we've so often seen wiping the blood of another hundred thousand humble, little Davids, who simply tried - though all too fruitlessly - to protect and preserve their own ways of life, from his giant red-stained hands and forearms.
This modern army comes to the field of battle with laser guided, bunker busting, nuclear armaments; They come with satellite imaged, unmanned aerial reconnaissance; they come in F-16's, Apache Helicopters, and Abrams tanks; with four-thousand round per minute miniguns, M-16s, P-92s, depleted-uranium rounds, and bullet proof body armor. With these things they come to make war upon whom? but the most meager forces; Foes armed with thirty year old weapons and improvised explosives - made from gasoline and cleaning products.
And then they belittle their enemy and dismiss him. They say he is not a soldier because he does not wear a uniform, when surely any uniformed combatant would be killed of the most incredulous means available. He would be simply blown up using missiles or bombs, and by men stationed miles away in air-conditioned RV's, guiding these weapons to their target using XBOX controllers. Or, if forced to meet face to face, perhaps an American would fire 40mm rounds from a turret atop a Hummer, while his enemy fled, only able to return handgun fire before his limbs and body were separated in a bloody cloud of sinew by the disgustingly dishonorable use of such overwhelming force.
Yet all the while the Pentagon's propagandists continue to wage media campaigns that speak to us of honor, discipline, service, and duty. Perhaps it is the blatant contradiction - this unrepentant lie - that has brought my generation to such disregard of Memorial Day and all it's celebratory cousins.
The man who commits a horror, but for what he thinks a good cause, can sometimes be respected still -- that is unless he tries to sell his sins as deeds of heroism. He who will not bear his shame leaves all around him to brunt the weight. And so, perhaps, we cannot lift him up in celebration of the ill-got gains, while still his shameful doings rest upon us.
I can't say as I've ever, in all my life, seen the military do anything to protect or benefit the people of this nation. I'm aware that previous militaries have done so, but I've never seen it with my own eyes. So I'm not saying that we shouldn't honor the sacrifices historically rendered to preserve us, I'm just telling you why we don't anymore. To me; to my age; the military is merely a tool of powerful men to gain and maintain their power. That's all we've ever known it as. And we can little be expected to separate and distinguish the soldiers from the military they comprise.
Patriotism, nobility, honor... We've mostly never seen these either - not in real life anyway - so you'll excuse us as we stack the logs for tonight's bonfire. But I don't believe this military has ever shown my generation anything worth honoring, has it?
The Day the Whole World went Away
I don't actually know the song. Greg just started playing it and within a single rep Brandon was strumming along, bobbing his head and mouthing the lyrics as Greg sang them. I improvised a drum line. I love how it came out, though I'm told it's nothing like the original.
One mic, mono recording; compressed to hell, EQ'd, delayed, reverbed, re-EQ'd, and sent to press. Yeehaw.
Dear Roy, It's Me, God.
I'll sit at work when no one's around and nothing's to do; my mind wastefully spinning its gears, slowly burning off the oil in the pan, considering some fleetingly irrelevant topic. Or sometimes I'll be busy at the thankless labors of torturing myself, the way we're all so often called to do, with thoughts and memories that drive me into fits of shame or rage or hatred. There I'll be quietly, privately digging open old wounds; chewing into the tender flesh of my psyche -- not bothering anyone. When all of a sudden this fellow in my head will bellow out a din of inseparably overlapping echoes from the back and bottom of that far-off parking garage of his, leaving my head swimming in the reverberations.
What he's saying I can only ever guess at by those few chance syllables that somehow manage to pierce the thicket of low-frequency noise that accompanies all his chatter; which shutters the chambers of my mind like an elevated train rattling the walls of low-rent housing. I sometimes lose my balance for a moment in the unexpected cacophony of his words. And it feels like I'm losing my grip.
He's an aggravation to me, really. He upsets me. Over the years I've gathered enough from his disjointed words to see what he's after; to understand what he's on about, more or less. And I say, he's nothing but a bother.
I've grown accustom to all the other things in my head. The ficus in the corner, the oak desk that smells faintly of wood oil, the giant, winding water slide that puts out into the pool of warm, unbuttered ramen noodles... Absurd, uncouth, extravagant; at least the other items, places, and people tucked into my skull are tame enough to hold their peace until called; To take a numbered ticket and mill about benignly until their order's up.
But this fellow in the darkness - in the depth - he's no respect for democracy! He thinks his interests overshadow the others; that his demands are more pressing than those of the rage-a-holic trucker who accosted me at roadside last year. Even these most vicious memories know to hold their tongue until the right hour, but that's too good for the booming voice. He thinks himself the only I should entertain - having nothing of the others.
Yes, I know what that one's after. And he won't get it! You hear me? I can assure you, you'll not have it your way. I'll stand against you till the final hour! So won't you just give it up already and leave me to my folly? Won't you stop assaulting me with that insipid internal clarity of yours? I've heard you - heard your story out in full - and I reject you! So stop making me feel like I'm insane! Stop driving me crazy!!!
If you'd only leave me then I wouldn't feel ill as I do myself these harms. I could continue lifting trifles up for life and death; I could rest every thought and word that's ever hurt me in my bosom, vengefully and eternally; I could go right on giving years, decades, perhaps even a century of this existence to all that bears no consequence whatsoever. And I'd do it all happily, mindlessly, madly!
Why, without you I wouldn't even know my own madness and insomuch I'd be thought quite sane. Especially among these people! To them my insanities are considered wise and noble virtues. To them my sociopathy is canonical law. Surely, with but a bit of effort I could be king of the crazies if you'd only let me go.
Thou accursed sanity! This inner voice torments me with the lure of his righteousness; his calm serenity. He beckons me to join him in his cave, or rather to release him from it, while all I'd like to do is wile away my days working, eating, and vacuuming the rugs. Why must he reflect this potential state of being. Why must he reach into the fiction of my life and show me things real. Do you know the trouble you've caused me, sir?
Every time he speaks, the inside of my teeth start to itch, and each halve of my brain takes up a knife to stab its neighbor in the eye. And I feel I've suddenly lost my mind. But I've learned this from the voice, at least: I'm not going mad, but merely recognizing my own persistent state of madness.
I'm crazy, he says, so are you. But it's the noticing that hurts. It makes the world start to spin and there's no mystery why. The world was always spinning, but crazy people don't make record of such things. Only sane men wobble with the Earth. Only sane men realize they're upon it.
But I don't want this sanity he offers. Anyway, it's oh so difficult to achieve. How resolute you must be to persist at sanity while walking in the midst of psychotics. And how easy it is to lose all the gains you've made in but one relapsing act of lunacy. Just a moment's derision can send you flailing back to incomprehensibility in a wink!
So leave me, you! I don't want the Earth beneath my feet. I much prefer it wafting over head. And I don't mind living and dying in madness, so long as it means I'll get to slave away my youth to empty, heartless labors; burning all the while with hatred for the million men I lie awake at night writhing in contempt of; mending what I mean to break; cleaning what I mean to soil; and piling every rotten thing atop the last until I cannot see nor smell beyond the wretch and rank of every evil I've acquired.
Wait, that sounded crazy... Oh, won't you get out of my head!
Average
Still, I had envisioned this site a forum for my art -- finally a place in which to distill and concentrate the most perfect of my artistic labors; from music to movies to text. And yes, my snippets of code were to have a place here as well. But with the ever expanding Blog Archive for this first month, and the umpteen articles regarding tips and bugs and source code, I feel I've come to earn too much, too quickly in the way of averageness.
And even though I continue to shun the commercial lure of 'Monetizing' this blog by snapping in a few Google Adsense bars in the margins, the posts themselves seem to have taken on the all too familiar din of website commercialism.
I find myself making links to the other sites I mention - and do not misunderstand, this effort is made out of respect for the labors of my peers, a general thoroughness of the record, and to the convenience of the reader. Motives aside, the links I make look just as they do on any other blog. They still resemble the embodiment of greed I find throughout this internet. Each feels like a tiny landmine, lain beneath the sod of text by some viciously capitalistic author, in hopes the unsuspecting will step on one and be blown up - flung away to some other site - whereby he shall earn one twentieth of one precious cent for the click-through.
And I suddenly dislike the name of this blog. I don't so much mind it in the domain, but "...you fucking people." staring at me from the top left of every page seems not only to indulge, but to encourage, even provoke, the indignations within me. And despite all my vitriol, in my best moments I don't really want to be this way.
My talent for entertainingly bemoaning the ills of society; for haranguing the ignorant, deceitful, and unjust is only, after all, a talent. A man can have a talent for making war; for killing other men; for lying; for stealing; for cheating; for any number of horrible, evil, sinful things, but talent alone does not justify him in the doing of them. While I have yet to find the sense of self and inner peace that might imbue me with the strength required to restrain the lustful passions of my woeful talent, I can at least envision the day whereupon I shall. That day arrives no sooner for these spiteful words I've lingered overhead, ever enticing me to some new fit of unrest. Yes, they'll have to go.
I feel better about it now. That last paragraph is so beautiful; so unusually sane! Knowing that in a moment these words will perch, as if my own flock of songbirds, atop this oh-so-average endeavor has washed away the memory of her averageness. We have reproven. We are baptized; clean again. We have direction.
I can go on.
Truly Write Protecting a USB Drive
I came up with this solution after my thumbdrive fell victim to a 'Virut' infected machine at work. 'Virut' attached itself to two executables on the drive, so that running either of the programs infected whatever system my USB drive was attached to.
After cleaning my drive with AVG Free Anti-Virus I searched far and wide for a way to be make my USB drive read-only. I looked into mounting the drive as a CD under the ISO9660 standard; I thought of encrypting the drive's contents; I played with multiple partitions...
I'm saddened to report that there is no way to truly write-protect a USB drive at the software level, and so the method I present here is admittedly imperfect. Nonetheless it provides some real advantages. Further, it is the only portable solution you will find short of buying a USB drive with a write-protect switch.
The Solution
The trick is to fill the disk space entirely. When the USB drive is full all write operations will be denied. Viruses will neither be able to infect existing files, nor create their own.
I found this concept here at Jared Heinrichs' blog. All credit is due to Jared Heinrichs for exposing this all-too simple method, used elsewhere in pay-software.
Using the command-line tool 'fsutil' included in windows we can create a dummy file that fills every last bit of free space remaining on our drive, thus securing it. For an explanation of how to do this manually, visit Jared's post.
As for me, I wrote a batch file to automate the job.
The Code
@echo off
REM * Written by: Roy Tousignant
REM * Date: May 19th, 2009
REM * URL: youfuckingpeople.blogspot.com
SETLOCAL EnableDelayedExpansion
ECHO.
SET sizelimit=1024000000
SET tmpfile=%cd:~0,1%:\readonly.tmp
FOR /f "tokens=3 delims= " %%A in ('dir \ /-c ^| find /i "bytes free"') DO (
SET freespace=%%A
)
IF /i %freespace% lss %sizelimit% (
IF /i %freespace% gtr 0 (
IF EXIST !tmpfile! (
FOR /f "tokens=3 delims= " %%A in ('dir !tmpfile! /-c ^| find /i "1 file(s)"') DO (
SET tmpfilesize=%%A
)
) ELSE SET tmpfilesize=0
SET /a freespace = freespace + tmpfilesize
ECHO Writing !freespace! bytes to !tmpfile!
SET /P okay=Okay?[y/n]
SET okay=!okay:Y=y!
IF !okay! equ y (
ECHO.
del !tmpfile!
fsutil file createnew !tmpfile! !freespace!
GOTO End
) ELSE GOTO Abort
)
ECHO Disc is already full.
GOTO Abort
)
ECHO Script detects more than !sizelimit! bytes of free space.
ECHO This script refuses to fill more than !sizelimit! bytes of space.
GOTO Abort
:Abort
ECHO The procedure is aborted.
ECHO.
PAUSE
:End
Usage
Copy the code above into 'notepad' and save it to your usb drive as 'readonly.bat'. Run it and answer 'y' to the prompt to create your dummy file. The window will close itself upon successful completion. To "unlock" your drive, just delete the readonly.tmp file it creates.
More Usage
I've restricted the code from writing a dummy file larger than 1Gb. This is a cheap way to prevent fsutil from filling up your hard drive or some other disk, in the event the batch file is accidentally run from the wrong drive. Remember: The batch file must be run from the USB drive itself.
If your USB drive is larger than 1Gb you can change this value in the batch script on the line that reads
SET sizelimit=1024000000
To change it to the exact size of your thumbdrive, open My Computer, right click the 'Removable Disk' that represents your thumbdrive and click Properties. Use the number listed as "Capacity" to replace the 1024000000 in the code, making sure to remove all the commas. Careful here! One too many digits and the size limit could end up being 20Gb instead of 2Gb.
Limitations
The flaw in this method of protection is that nothing prevents the deletion of files. If a virus is so inclined it can still wipe out your thumbdrive the instant you connect it. And if a virus' author were sufficiently devious, he could write a sneaky little function that deletes a few adjacent files, freeing just enough space on the disk to place the virus or infect an executable.
The flipside here is that even virus authors have lives and I'm not aware of any virus that makes such a herculean effort out of anticipating a full disk.
It's a flawed solution. But it is the best we can do without a hardware fix. It's greatest virtue is how unlikely it is that a virus will infect the drive without the user knowing. A virus may remove and replace a file completely, but cannot easily infect one to keep itself hidden. It can delete files to make room for itself, but we have gained warning by way of our missing files.
Design Notes
To prevent the program from running on a large local disc, it would be better to evaluate the total capacity of the drive instead of the free space remaining. But I could find no reasonable method of gaining a drive's true capacity at the command line. At first I figured adding together the free space and the used space values provided by
dir \ /s /-c
would work, but in testing the value of used space reported over 100k less than correct. The only other method I could find involved the wmic, which added an intolerable delay to initializing an otherwise simple script.End of Line
As a computer repair technician, I'm satisfied with this solution for myself and I'm happy to recommend it. Though, if pressed, I recommend buying a USB drive with a write-protect switch even more.
Posting Blocks of Code on Blogger
pre.code {
width: 94%;
overflow: auto;
overflow-y: hidden;
display: block;
line-height: 1.2em;
background-color: #f5f5ff;
padding: 0.5em 1em;
border: 1px solid #bebab0;
padding-bottom:15px;
}
From the CSS you can divine that I'm using
<pre class="code">
to wrap my blocks. I started out using <pre><code>
, and perhaps that could be made to work as well, but somewhere throughout my cross-browser compatibility struggles I ditched the code tag. It's redundant anyway. Pre tags preserve your whitespace and set a monospace type. Code tags set a monospace type. So why bother saying the same thing twice? Why? Why say it twice? Seriously, why should I say it twice?I also had a lot of trouble with the
<pre><code>
arrangement where, because I was wrapping one in the other, IE would favor the <code>, ignore the <pre>, eat my whitespace and word-wrap my text. Meanwhile Firefox looked perfect - that is until you grabbed the scrollbar. Scrolling the code block would leave the background-color and border behind, sliding us into a void of undeclared white-space. In the end it proved too much hassle keeping the redundant <code> tag in just for it's own sake.Even with the <code> tag out the window, I ran into the much maligned IE v-scroll bug. When a Mozilla browser adds a horizontal scroll bar to a block, it does it on the outside of the block. IE does it on the inside... You say tomato, I say flibbidy floo. Problem is, IE doesn't seem to account for the space the h-scroll has come to occupy. It doesn't stretch the container out, it just slaps the bar over the top of it. Now you've got a horizontal bar blocking out the last line in your <pre>, which necessitates that IE stamp a vertical scroll bar onto the block as well!
Sure, this is an ugly and unnecessarily contrived way of getting the job done: granted; but there's a bigger downside than aesthetics here. If you try to post a single line of code into a <pre>, Internet Explorer's intrusive horizontal and vertical scroll bars completely obscure your text. Scroll up, scroll down, the most you'll ever see is a sliver of what's there. Your one-line block of code is now a tasty block of scroll bar.
The simple style sheet above cures all that ails. I'm not going to explain it, just take it and go! Oh, but not until after reading this next part, of course.
The Aforementioned Template Tip
Even with the CSS implementation described here IE continued to word-wrap my code blocks. Testing outside of Blogspot proved the CSS good. So I started peeling through Blogspot's template, looking for some overriding declaration. I didn't catch it myself, but eventually found an old post on the Blogger Help forums containing the offending declaration's locale.
#main-wrap1 {
...
word-wrap: break-word; /* fix for long text breaking sidebar float
in IE */
}
If IE refuses to respect the <pre> tags on your Blogspot site, search your template for a
word-wrap: break-word;
being declared in the #main-wrap1 id and comment it out. If your template doesn't have a #main-wrap1 id, then you'll have to poke around until you find what your template calls it.Caution: You'll likely find more than a few
word-wrap: break-word;
declarations throughout the template, and it's best not to remove them all. It should be obvious - by their names - which declarations belong to the sidebars, headers, footers, etc., and which belongs to the div(s) where your posts live.Why, you guys? Why should I say it twice?
Blogger Bug - Internal Links Rewritten by the Composer
Using an internal link means that if I decide to change the namespace of my blog at some point in the future the link will remain valid, since it only ever specified the subdirectory paths. This is especially important if you are using a domain name with your blogspot site, as you may in the future cease to own the domain. If you were to specify the full address in your links they will all break and become invalid if and when you let your domain lease run out.
The Bug
Entering Compose mode in Blogger's text editor resolves and rewrites all ambiguous links as children of www.blogger.com, thereby breaking them.
Example
Starting in the Compose window I click the Link button. In the URL field I enter the following ambiguous, internal link:
/2009/05/my-article.html
If I switch into the Edit Html mode my link is still properly preserved and displays the HTML code:
<a href="/2009/05/my-article.html">Visit My Article<a>
However, if I switch back into the Compose window - though I cannot see it yet - in the background my link has been resolved and specified. The HTML now reads:
<a href="http://www.blogger.com/2009/05/my-article.html">Visit My Article<a>
Not only has this negated the purpose of the ambiguous link - which is to maintain site integrity across changes in the domain name - but it has broken the link by resolving it to www.blogger.com instead of our blogspot site.
Even worse: Because the trigger here is simply entering into the Compose mode, if you merely attempt to edit or update an article containing ambiguous links, and if the editor opens into the Compose mode by default, then it will have already broken all internal links on the page just by reopening the post. If you save this reopened post you will have corrupted all your links.
Workaround
The only solution here is to never, ever use Compose mode. Switch into the Edit Html interface and get comfy. It's not much of a workaround, I know, but it's the only "solution" I've found.
I had hopes of finding a different access method that would allow linking to blogspot sites by blogID and postID. Alas I can find no record of the proper method for this and spamming the likely implementations hasn't gotten me anywhere, either.
For now, those concerned with using and maintaining ambiguous links will want to make sure the Settings>Formatting> option "Convert line breaks" is set to Yes and relegate themselves to the Edit Html interface. It's probably not a bad idea in any circumstance, as this is surely not the only bug in the Composer.
Blogger Bug - Corrupted Javascript for() loops
The Bug
Twice, when I have had call to write a javascript implementation for a blogspot page I have found that everything beneath the first line of a for() loop is chewed up, garbled, and spit back out upon saving it. Blogger doesn't throw an error of any kind, it just saves your code to the gadget, having silently mutated and destroyed what was written. This is observed by simply returning to the gadget via the edit button. There the code will be corrupt.
Example
<script type="text/javascript">
function addPlayers() {
var allmp3s = document.getElementsByName('mp3');
for (i=0;i<allmp3s.length;i++){
var mp3Player = buildEmbed(allmp3s[i]);
allmp3s[i].insertBefore(document.createElement('br'), allmp3s[i].firstChild);
allmp3s[i].insertBefore(mp3Player, allmp3s[i].firstChild);
}
}
</script>
Paste the code above into an HTML/Javascript gadget and save it. Now click edit to return to the code. Others have confirmed that as of this post's date blogspot corrupts it like so:
<script type="text/javascript">
function addPlayers() {
var allmp3s = document.getElementsByName('mp3');
for (i=0;i<allmp3s.length;i++){
}
}
mp3player="buildEmbed(allmp3s[i]);
" br var allmp3s[i].firstchild);
allmp3s[i].insertbefore(document.createelement( ),
allmp3s[i].insertbefore(mp3player,></script>
Workaround
Simply use another type of loop. A while() loop and a counter variable can be used to do accomplish the same results your for() loop might have. I haven't observed Blogger to corrupt while() loops.
Embed Flash MP3 Players w/ Javascript
What it Does:
The code provided here finds any <a> tags on the page that have been assigned the attribute, name="mp3". Then, using the URL from the <a> tag, it generates and places the proper code, embedding a flash mp3 player just above that <a> tag's link. Unaltered, this script uses the "Maxi" mp3 player hosted and available for download at http://flash-mp3-player.net/. (Though you need not download anything to run this script.)
Why?
First: Convenience. With this implementation I need only create a standard link and give it a name. From there, my mp3 player will appear on it's own, without all the ubiquitous <object><param><embed> malarky typically required to embed a flash file.
Secondly, to enable a reasonable level of dynamism to my Blogspot hosted site. If and when someone designs a slicker or more efficient mp3 player or... let's say the mp3 player I've been linking to disappears from its server someday - I'd like to be able to fix the broken links and integrate a new player into my site without having to edit every single post in which I'd ever embedded an audio file. This javascript standardizes the website's mp3 player, so that changing the embed code in the script effectively changes the embed code everywhere on the site.
How?
<script type="text/javascript">
/*
-----------------------------------------------
Dynamic Flash Embedder (for Linking MP3s)
Written by: Roy Tousignant
Date: 15 May 2009
URL: tvopiate.blogspot.com
----------------------------------------------- */
var playerloc = 'http://flash-mp3-player.net/medias/player_mp3_maxi.swf'
function buildObj(mp3) {
var flashtags = '<object data="'+playerloc+'" width="200" height="20" type="application/x-shockwave-flash">'
flashtags += '<param value="'+playerloc+'" name="movie">';
flashtags += '<param value="mp3='+mp3.href+'&showstop=1&showvolume=1" name="FlashVars">';
flashtags += '</object><br/>';
var obj = document.createElement('span');
obj.innerHTML = flashtags;
return obj;
}
function addPlayers() {
var mp3objs = document.getElementsByName('mp3');
var i = 0;
while (i < mp3objs.length) {
if(mp3objs[i].tagName == "A") {
mp3objs[i].parentNode.insertBefore(buildObj(mp3objs[i]), mp3objs[i]);
}
i++;
}
}
window.onload=addPlayers;
</script>
Usage
If you're using Blogger add a HTML/JavaScript gadget to your layout and paste in the code provided above. It doesn't matter where in your Blogspot layout you place the gadget. It will work just the same.
With the code in place you simply create links to the mp3 files you want to embed, making sure to include name="mp3" in the <a> tag. You can do this anywhere on your page: in posts; in the sidebars; in the header...
<a href="http://www.mymp3host.com/song.mp3" name="mp3">Download my Song</a>
That's it. Any links you make that carry the name "mp3" will magically receive an embedded mp3 player one line break above the link, allowing visitors to stream the file right there.
More Usage
Changing the flash player will probably require some basic understanding of simple coding. It's pretty straightforward to those who know, but for those who don't I'll provide an example. (Be it any help to you or not.)
To change the mp3 player that is being embedded you just need to edit the 'playerloc' and 'flashtags' variables near the top of the script to reflect the object/embed code for the new player.
For example, Google has a flash MP3 player that can be linked to. To embed Google's player manually onto a page you would use this object/embed code:
<object data="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://www.mymp3host.com/song.mp3" width="400" height="27" type="application/x-shockwave-flash">
<param value="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://www.mymp3host.com/song.mp3" name="movie">
<param name="flashVars" value="playerMode=embedded">
</object>
Therefore, to integrate Google's embed code into our script you would replace the playerloc and flashtags variables in our javascript code with:
var playerloc='http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=';
var flashtags = '<object data="' + playerloc + mp3.href + '" width="400" height="27" type="application/x-shockwave-flash">';
flashtags += '<param value="' + playerloc + mp3.href + '" name="movie">';
flashtags += '<param name="flashVars" value="playerMode=embedded">';
flashtags += '</object><br/>';
Note here that Google's player looks for the mp3 location to be included in-line with the link to the audio player itself, whereas the Maxi MP3 Player being used by default expects the mp3's url to be declared in the flashVar param.
And that's all the hints you get. ...ya' bunch of noobs.
Design Notes
"Why did you use a while loop instead of a for loop," you ask? To avoid a bug in blogger's code. In development whenever I saved the script to Blogger's HTML/Javascript gadget, use of the for loop caused everything thereafter to be scrambled.
End of Line
I suppose that's it. Wow, it might've taken as long documenting it as it did writing the damned thing. And I was trying to keep it brief! Actually it took me about 10 hours, start to finish, developing this script; forced to learn all sorts of javascript functions I'd never worked with before; fighting the Blogspot bugs to make it work in the gadget... Well.
Do leave me a comment if you're using it. I'd love to see my handiwork gracing other sites. And if you have any problems with it... 'the hell do I care?
Grand Re-Reopening
I also take heart in the notion that this freely provided medium will most probably outlive my interest in it; will possibly even outlive my ability (or willingness) to continue breathing. Whereas any payed hosting solution surely fails to outlive even my bank account.
I won't say much more. I'm getting sick of "opening" the site, honestly. It's all pomp and circumstance. Besides, I've got a pile of articles that need written and more that need transferred from the other blogspot site I mean to deprecate. So, then...
'Twas a Good Day for Disc Golf
It's nice to see such a familiar course change and become something new. Especially when you shoot the kind of first-out games I did today.
Okay, the scores are less than impressive: +1 on my first round and -1 on my second. But I tell you those are high marks for a day like today. The wind was gusting intensely throughout the whole back half of the course. So much so, more than once I watched my disc parachute in the wind, rolling and bouncing a hundred and fifty feet off target and onto some other hole's fairway.
Despite the wind I was happy with my game and the new course. Hole 2 has been lengthened by about thirty feet, which was nice. It really showed me how much more distance I'm getting out of my drives this year, in comparison with last. Hole 3, though drastically relocated. still sits on the edge of a steep hillside, daring you to throw for the chains, miss, and find yourself forty feet overshot or rolled away.
In fact, during my first round I threw a pretty chip shot right at three's pin. It bounced off the ground at the pole and slid out of site, just over the hill's crest. I thought I had placed within five feet of the pin. But from atop the hill I found no disc. A sweeping gaze revealed my errant disc, some thirty feet rolled away from where I watched it first touch down, lying at the bottom of a ditch. From the bottom of that ditch, slightly perturbed, I made my shot for birdy. I threw at an angled pitch; a diving shot that guaranteed, if I missed, I wouldn't go rolling down the hill again. The disc went up six feet to the right of the chains, held in the air briefly by the gusting winds, and dived straight into the bottom of the basket.
I'll remember that shot for some time. Aside from being the kind of long-distance putt I rarely ever make, I have never felt a disc - mine or anyone's - go in the basket like that. It was so gentle. It grazed the chains, but sounded dainty as a wind chime. And when it touched down it didn't ping or bong when it connected with the basket either. It was as though the disc had given itself over to me, abiding my desire, unresisting. I hadn't so much thrown it at the pins as placed it atop my open palm and blown it where I wanted it to go. I felt this strange touchdown in my arm's bicep when the disc met the basket. And it was odd.
Hole 4 has been lengthened as well. Last year I could never quite drive to the pin. I could get within twenty feet, but I never overshot it and I never got within a comfortable putting distance. This year, thanks some to my 'longer arm' and thanks more to the wind at my back, I crushed a drive all the way to within twelve feet of the goal. On a hole listed as a par 4, no less! Unfortunately I didn't eagle, for the wind - fickle, she is - turned against me, conspiring with my timid short game to concoct an unlikely miss.
The last five holes were throwing into or against the cut of the wind, suddenly making par a worthy goal. It took me three holes and as many bogeys to realize that my heavier, 170 gram Valkyrie disc, which I had figured - for it's weight - all the better to play into the wind, is more or less helpless in the wind. And, in fact, it was my light-weight driver, the 150 gram Valkyrie Star, (I'm a Valkyrie whore - love 'em) that I only tried out of frustration, that somehow managed to pierce the wind without parachuting off course.
On the second go-round I had a better idea of how to shoot into the wind, which probably won me those two extra strokes. The only hole I recall being especially noteworthy was the ninth. Hole 9 has always been an intimidating hole. It plays about 150 feet straight between two lines of trees and it's a tight corridor. That first one-fifty is no more than 15 feet wide the whole way down, and then it empties to the left. I've always had something of a knack for the hole. Last year, more often than not, I managed to consistently thread the needle of hole 9 and skip right up to the basket. But that was last year, and this year they've moved the basket.
The dog-leg left that hole 9 always featured is now a much sharper cut. The trick to nine's corridor used to be throwing a flat, well-aimed shot that broke very gently left at the end. Keeping the disc low - say eight feet off the ground - used to work out well for me. But now that the pin has been brought in, exiting the corridor has become more of a sudden 60 degree cut to the left.
On my first attempt at hole 9 the wind got under my disk, keeping it too flat, and I threaded the corridor, but without any break left at the end. The disc slammed into the tree line and I ended up taking my second shot from the forest's edge. And it cost me. I ended up bogeying the last hole, going positive on my otherwise even round. So on my second go I opted for a 30 degree release, with a lot of power behind it to keep it between the trees until the end. I hit it perfectly; didn't so much as graze a single branch on my way out of the corridor and put myself into a very nice birdie position. Again, the wind foiled my birdie but this time I was able to save par.
Yes, 'twas a good day for disc golf at the Andersonville Rd., Bay Court Park. A good day made even better when, between rounds, I put down a towel on the beach at the lake's edge and sunbathed while reading Kafka's 'Amerika.' 'Twas a good day for disc golf.
'Twas a good day for Roy.
Dual Fists of Inspiration
Wouldn't you just know it. I came home from work yesterday with a song stuck in my head: 'Distance' by Long Shot Party. "Who and/or what the fuck is that," you ask? It's a J-Pop song featured in OP2 of Naruto Shippuden. For the unitiated, "OP" means Opening - as in the opening credits of a show. (think Cheers: "...where everybody knows your name...") In anime, the opening sequence tends to change as episodes and story arcs progress, reflecting the story to come and the mood the writers want to present in this batch of episodes. So OP2 means the second opening sequence / song in the whole Naruto Shippuden library.
Sigh... Anyway, I came home with that song stuck in my head and I wanted to learn to play it. I looked up the tab with romaji lyrics and three hours later I had a recording I was so uniquely and overwhelmingly satisfied with that I would go on to listen to it at least fifty times -- giddily dancing like a five year old who's having too much fun to stop and take a pee.
So proud was I of what my audio workings had rendered that I felt the dire need to share it with the world. Usually I'd just upload it to muh' myspace music page, but suddenly that seemed silly. "I've got my own website now," I thought, "why should I rely on Rupert Murdoch to host my singing sensations?"
Thus began the unyielding attempt to shoe-horn an mp3 player into that minimalist site design I first published just hours earlier.
But inspiration was about to strike twice! For as I pondered the task before me an image popped into my head. It was a logo for the website. I won't bother describing it. (Scroll up and look left, dummy.) And once I had that logo in place, well the rest of the design finally started coming into focus.
So here we are. A website that damn-near looks like a website! I just might-could build on this one. Here's hoping I don't throw it away in the next 24 hours, like its predecessor.
P.S.: You damn well better listen to that song I put up!
Distance
This is a cover of a Japanese punk rock song 'Distance' by Long Shot Party. I first heard this tune in Naruto Shippuuden's OP2 theme and this is purely a cover of that minute and a half, thematic version.
At time of posting I consider this to be my most enjoyable solo recording project ever. It's just a trifle, sure, but it's exactly as I want it, and that's rare.