Wednesday, August 10, 2011

Foguckyourself.com

This site will (after updates push through) be accessible from (www).foguckyourself.com

The search term had brought a few people here (I used it as a post title a while ago), and I figured I'd see if it was available (Spoonerisms rock, and that's one of my favorites), clearly it was. I am very excited, for some unknown reason, that I was available to get that domain. Weird.

Anyhow, fo guck yourself.

~Nic

Tuesday, August 9, 2011

jQuery wildcard selector, and input mask on Rails 3

For my big project I wanted to be able to load one jQuery partial in my view (to have content_for a :jQuery_ui yield), and find elements with IDs containing certain things (Like *phone*). I searched high and low and finally came across comments in a blog somewhere (the link is long gone). *= works as a wildcard, surrounding whatever you put in with wildcards. This is significantly better than having to install a regexp plugin for jQuery (and all the overhead that comes with it)

I used masked-input-plugin, a simple jQuery plugin. My form contains something like:

<%= f.text_field :phone_number %>
(outputs [model_name]_phone_number)
and later

<%= f.text_field :postal_code %>
(outputs [model_name]_postal_code)

and this code applies the masks accordingly:

//Select anything with "phone" in it, and apply mask. '9's mean numbers only.
  $j('input[id*="phone"]').each (function(){
      $j(this).mask("(999) 999-9999");
    }
  );
  //Select anything with "postal_code" and apply mask
  //The '?' means anything following the '?' is optional.  In this case, the +4 on 
  //the postal code is optional.  Even though this is called postal code,
  //it's really only for a zip, since Canada (for instance) uses alphanumeric codes,
  //which will be disallowed in the input.
  $j('input[id*="postal_code"]').each (function(){
      $j(this).mask("99999?-9999");
    }
  );
  //Select anything with "max" (for instance my_max_users) and apply mask.
  $j('input[id*="max"]').each (function(){
      $j(this).mask("9?99999", {placeholder:""});
    }
  );

Any non-numeric input is ignored with the 9s, another sanity checking bonus. Now, as long as the user has javascript turned on, I can expect MOST of my input to be sanely formatted.

This was a very exciting find, and is really here in case I need to figure it out again in the future. Hopefully someone finds it who's trying to do the same thing -- that's why the title is so verbose.

~Nic

Friday, July 29, 2011

Come on teaple now, pile on your brother..

Remember when the US Gov. basically allowed JP Morgan/Chase to buy Bear Stearns for $2.00/share (it ended up being higher, but still..), which was decided in a corporate suite somewhere in N.Y., and we were told that if it didn't happen, the entire world economy would collapse? I do. We're in the exact same spot, but instead of Bear Stearns, et al, it's now the U.S. Federal Government.

It's interesting, exactly WHY the world economy would have collapsed. It wasn't that Bear Stearns was too big to fail, necessarily, it's that the failure of that (among other high-seas pirate investment firms) would have completely decimated the remaining threads of faith investors had in ... investment. "Too big to fail" was illusory -- an analogy to simplify the explanation of what would happen, but that's really besides the point.

My point is: It's not that a U.S. Government default would be necessarily devastating in itself, it's that, should such a thing happen, everyone will panic (I obviously only can assume...). Whether this herd-thinking is rational or not is irrelevant. Failure to raise the debt ceiling "proves" to investors in both private and public debt, that our system of government (namely, representative democracy) is incapable of self-correcting action when it reaches a[n] [arbitrary] certain point.

If the worst should happen, we should expect some pretty fucking dire consequences. There will be a domino effect, I would assume, of loss of faith in a wide gamut of institutions from government, to blue-chip, to ma/pa shops. I would assume there will be runs on banks (sooner or later people will realize that the FDIC is basically the federal government. Bond interest payments are paid before bank members), which will choke off the money supply (which apparently has a statutory limit), etc, etc... I can't make it play out any other way.

The fact that a few key puppet masters can control and manipulate large blocs in the federal legislature undermines the point of a representative democracy. It appears that we now live under the tyranny of the tea party, Fox News, and Grover Norquist.

I think we are witnessing the upper bound of the ability of a democratic republic, and this is regardless of any debt ceiling fallout. This is quite unfortunate, since there really is no viable alternative.

Hopefully I'm wrong.


~Nic

Friday, July 22, 2011

Mr. West, here's a hint: it's not because your black

From TPM:

"The thing that really most aggravates me is that there is this double standard, in that the people on the hard left can continue to attack conservatives and especially minority conservatives, and female conservatives," said West. "But yet when all of a sudden you stand up and you say that you will not tolerate this anymore, then they claim to be a victim -- which I find just absolutely laughable."

This is pure propaganda. I dislike you just as much as Gingrich, who is "decidedly white". Matter of fact, when I first learned about your Wasserman-Schultz outburst, I had no idea who you were, not to mention your ethnicity. I thought it was just as fucking stupid and childish as I do now that I know your black. STFU.

~Nic

Thursday, July 14, 2011

The people who will control our future

...lose again. In a game of brinkmanship, those who don't care about going over will always win. I'm disappointed in a way that Dayton gave in.. pulling more money out of the education hat to solve problems, but in all reality, what the fuck else could he have done? Held out? Norquist is breathing down these assclown's necks. Just ask Coburn. The Rs are afraid for their jobs, and pushing "lower taxes" sounds good to anyone without the time, or willingness to think it all out.

I like Dayton. He's a good man. His move today, I think, wasn't a political move, or anything like that. It was disappointing, but revealing. Nice guys [lose].

~Nic

Saturday, July 9, 2011

Some skin in the game

So there's a new meme that seems to be picking up steam (heh) with even the more liberal of people I pay attention to: `The poor need to have some skin in the game too`. I would like to request that if you are one of the people thinking/feeling this, that you take a fucking step back and think about it for a second. What is the purpose of taxing (raising taxes on) poor people (No numbers are mentioned, I will assume below the poverty line of about $18k/year for a family of 4)? Is it symbolic? Do people who have shitty lives suddenly feel something like "Oh, well now that I've got skin in the game I don't want to be poor anymore"? Is that how this shit works? HUH? Is it to make an impact? Can you find me someone who thinks "Oh, well now that I pay [more] taxes, I suddenly..." I can't even finish that sentence. It makes no fucking sense to me at all. What is the point here? Enlighten me.

~Nic

Overtime

Bwhahahahahaha

My favorite part?
"Ethan Nadelmann, Ann Cooter" @7:05

~Nic