Sudo lets me edit all kinds of nutty things!

Still learning how to do as many things as possible from the command line here, am writing this down for future reference for myself. If I try to edit a file, and I’m all like “vi filename” and I do my edits and am all like “:w”, and it’s all like “no, you need to use a !” to save! And so then I’m all like “:w!” and it’s all like “E212: Can’t open file for editing.” That’s when I need to edit that sucker as root. Which means I shoulda typed in “sudo vi filename” and then my password, and then I can edit that file like no one’s business!

Using the jQuery clone() method with a lightbox

So I’m using Flexslider, which is a jQuery slideshow with some great touch capabilities. However, it only displays one slide at a time, so I hacked at it until I got it to display 3. Of course, only later did I realize that someone already forked it on Github like 2 months ago and did this before me, oops. Anyhow, Flexslider uses the clone() method to pad out slides at the end of the slideshow, and, with the modified script, these cloned slides get displayed.

So I’m using Lightbox (the Lightbox2 module for Drupal 6, to be specific) and it’s not liking those cloned slides. Nope, not at all. Doesn’t work. Have no clue why, and couldn’t really find anyone else with that problem on the internets. What I did figure out, though, is when you call clone, if you call it with the parameter of true: clone(true). And that seems to work, as my cloned slides now open in lightboxes. So, yay!

Some things to get done next year

So I was waiting in the airport last week and decided to write up a list of all of the things I wanted to get done next year. And, here’s that list:

  • Finish 2011 NaNo CYOA novel (or finish first draft of 2009 NaNo adventure/maybe sci-fi novel)
  • Translate Quest into Spanish
  • Somehow convince more people to buy Quest (Hey! I wrote a CYOA YA light fantasy, called Quest for the Fountain of Life! It’s only $1.99 for Kindle!)
  • Continue food blogging at a minimum of once a week
  • Get WordPress responsive design theme and customize it with the tastyniblets.com look/branding.
  • Use probably the same theme for ptocheia.net (maybe trash current layout as it’s rather dismal, might just use a theme default)
  • Pull data from blogs and news sites onto rapidsthuglife.com. Maybe an auto-filled scoreboard?
  • Execute my fabulous idea for a MLP:FiM/Last Supper watercolor painting.
  • Do something with my pointless Tumblr account. Wait, I’ve got an account under my handle. But I can’t figure out what the login is. I used all of my email addresses trying to do “lost password”, too. Hmm, when did Tumblr start? Maybe I registered an account under an email I don’t use anymore? Hmm. Or something else janked my handle. Time to beat someone, then.
  • Do a work blog post at least once a month (I’ve seriously got like 20 topics in a .doc, I just don’t have the time to write anything.)
  • Revamp varoper.com (hmm Drupal 7? Good chance to learn Rails?)
  • Get a decent piano or keyboard (with alll the keys). Actually use it.
  • Go to gym 2-3x a week.
  • Go skiiing and snowboard this winter.
  • Build a CYOA module for Drupal 7.
  • Get more involved in local Drupal community.
  • Finish my stupid pile of sewing projects.
  • Grow some freaking tomatoes or something.
  • Repot my aloe and kiwi cactus

Unrelated (well, completely related), I do have a New Year’s resolution: get more sleep.

Distraction is the name of the game, kids

Nanowrimo is in full swing, and I totally hit 35,000 today. It’s so much easier to write (for me, at least) choose your own adventure books than regular books. No more deciding which direction to take, I can just go in every direction! The story’s pretty meandering so far – I like trying to tie in details from each path with other paths, so that characters can still get pretty fleshed out. And, so, a decision you make will influence decisions other characters make as well. But, I’m afraid that’s for later. I’m kinda short on endings so far – my main character (named “Mary Sue”, haha) has been killed once, hospitalized once, and had a few romantic encounters, but that’s about it. When I first started this endeavor, I had all sorts of lofty ideas about doing literary tie-ins with non-main characters (mostly because Snow Crash is the Best Book Ever and so I wanna gonna slip in Hiro and YT somewhere, and then branch off in other fun ways) but so much for loftiness. I started off with characters that reminded me of pop culture references (an Anthony Michael Hall a la John Hughes kid, along with a Rickie from My So Called Life character). But then everything sort of started devolving when I started naming new love interests after Colorado Rapids team members. And somehow added in Jersey Shore people as well. Hah! It’ll get cleaned up later, I’m just trying to pump out the content. Writing is rather like making pottery. The first draft is really just piling a giant lump of clay on the wheel, the real work is in the editing.

Am headed to LA for Turkey week, that should be fun. I will be paying a big chunk of Stupid tax to the local Apple store during that time, where my Mac shall sit for that duration having it’s keyboard repaired. Though it means NaNoing on my teeny netbook, I’m looking forward to not having a laptop for awhile, as it will make it near impossible to do work for my job. Considering I haven’t had a sick day where I didn’t have to still work, and I was crouched in the corner at the HP theme park in FL last spring, supposedly on vacation, doing work, it’ll be nice to have absolutely no way to do work. I am struggling with some serious burnout issues, and am really hoping that this break (along with my upcoming week in Richmond) will help.

Speaking of that week in Richmond, I’m not going to insanely plan it like I have other trips. This is because I want to be lazy, and it’s not like I have a car to use (not really looking to rent a car for the week, and the trips mostly to see my parents, who I haven’t seen since last September, anyhow).

Not too much else going on. Now that I’m writing more, I find that I’m reading more. Which is a good thing. Am kinda cracked out on sleep, which sucks. I look at this laptop and my phone too close to bed, which messes me up. So I’m trying to shut them off earlier, and read before bed. But now I’m waking up an hour before I need to, and then dozing off again 10 minutes before my alarm. I just want a decent night of sleep, but that’s been proving challenging. It’s even more frustrating when my body doesn’t cooperate on the weekends as well, as I super depend on weekends to try catching up. Oh well.

I need more time. I want to learn Ruby, and then rails. Possibly Python as well. Every day I am reminded of how many things I don’t know, and it drives me maaaaaaad. I mean, I guess it’s good, if I knew everything what would be the point of getting up. I just feel like unless I’m actively learning new things and producing new things, I fall behind, which is super stressful.

I need to go skiing or snowboarding. I got pants to do so, and have yet to experience either. If needed, I’ll look for a Meetup group that’s doing the beginner’s version of one or the other, with hopefully a carpool involved. I’ve been rear-ended once up in those mountains, and my little car is mountain-shy still!

On a final note, I ate all of the chocolates and now have none. Dang!

Joomla on Windows Server 2008 running IIS 7.5: “could not instantiate mail function”

I hate it when I do a google search and can’t find what I need, so I’m mostly posting this so the next time I get this error, I can do a google search and find the post I made about this error in order to fix it. Yay internet.

Should the error “could not instantiate mail function” pop up when using Joomla and doing something that requires using php mail(), and you happen to be using a Windows server (2008, running IIS 7.5 in my particular case), there’s a good chance you (or I, as the case may be) restarted IIS at some point and your SMTP server never bothered to restart itself. If you’re like me, you had to set up SMTP in IIS 6 for some bizarre reason, so open up the IIS 6 Manager, check if your SMTP Virtual Server is running, and if not, start it!

To test if it’s running without filling out a form or whatever, either put together a sweet little php file that spits out “yay” if email sends or “nay” if not, or just try “Forgot Password” in Joomla and see if you get an email.

Yay!

Joomla: How to get a user’s K2 group

Joomla’s been driving me crazy lately, I’m sticking this code here for future reference so I can find it again, and in case someone else needs it for whatever reason. Use this to grab the K2 user group that a user is in with a Joomla install (works for 1.5, not sure about older/newer versions).

Enjoy!

$user =& JFactory::getUser();
//name of K2 user table
$k2usertable = 'nua_k2_users';
$userId = $user->get('id');
// get user Group
$db =& JFactory::getDBO();
$query = "
  SELECT ".$db->nameQuote('group')."
    FROM ".$db->nameQuote($k2usertable)."
    WHERE ".$db->nameQuote('userID')." = ".$db->quote($userId).";
  ";
$db->setQuery($query);
$userGroup = $db->loadResult();

//the user group's id
echo $userGroup;

Jurors, Food, Work, Life, Etc..

I feel pretty awful for the jurors of the Casey Anthony case, and am looking forward to this whole thing dropping out of the spotlight sometime soon. For those that don’t know, I was on the jury for a murder trial a few years back. It was a fairly short trial, 3 1/2 days including deliberation. Both educational and difficult, and I hope I’m never on a murder trial ever again. My wooziness to blood/wounds made it very difficult to not get lightheaded and pass out during the part where photographic evidence was being detailed to us. Anyhow, we were pretty sure the accused was guilty. However, the defense was relying way too much on forensics and completely ignoring other things, and in the end we could not say beyond a reasonable doubt that he was guilty. So we went with the verdict of “not guilty.” And, it was so awful to leave that courtroom while seeing and hearing the victim’s family’s reaction to our verdict. But, it would have been so much worse if the accused actually was innocent, and we’d decided he was guilty. Being on a jury is tough, and I’m sure so much more so for a high profile case, so people really need to cut those jurors some slack.

So. I’m living in a motel right now. Some who read this know, some don’t. Drew and I broke up over a month ago. I’m moving into an apartment in Capitol Hill in about a week and a half, incidentally on the same day that Carolyn will be flying out to visit for the weekend. Things have been…weird. Sad. Strange. Am still dealing with it, and likely will be for awhile. People have been very supportive though, and I really appreciate that.

I miss having a kitchen. I got to use Jonathan and Jill’s kitchen a week back and have a sushi party with them, which was fun. Got some really good salmon, here’s a shot of some of the salmon rolls:

sushi

Work’s going OK, though I’ve been staying up late a few more nights than I’d like dealing with the persnicketiness of HTML emails. HTML emails are definitely one of the lesser appealing things that I do. One thing that I’ve been doing lately that I hope to do more of is developing for mobile websites. There’s a great Drupal module called Mobile Tools that will switch your theme based on mobile device detection, and with that plus playing with the JQuery Mobile theme, I’ve been working on the mobile version of my work’s website. There are of mobile design is so new, I think there’s lots of opportunities to do cool stuff. I’ve also been dying to actually contribute a Drupal module to the Drupal community, and am hoping I can find something good to contribute involving mobile.

Am hoping to do some packing today, I’m trying to get rid of stuff I just don’t use – I hate having lots of stuff, and moving it is a big pain, so I’m trying to better justify the things I own. Super fun times.

Mystery lists

I cleaned today. Went through piles and piles of things. I’ve got scads of notebooks, and it’s bizarre to see what kind of random crap shows up in said notebooks from eons ago, things that I can’t even begin to interpret.

I found this list, which appears to be in Drew’s handwriting, and neither of us has a clue as to what the heck it could possibly mean.

Hung Kawk* – 52
Hastings – 50
Bai Bai Ho – 44
Hung Long – 42
Oxford – 44
Brighton – 48
Norwich – 57
Rik E Balls – 42
Invaes Place – 40
London – 42
Long Duck Dong – 52

No clue. No clue at all.

Laundry should really be done on a regular basis

<div class=\"postavatar\">laundry-should-really-be-done-on-a-regular-basis</div>

I’ve somehow managed to go about 3 weeks without doing laundry. I was super overloaded with work, then I was super overloaded with vacation, then I was super overloaded with “crap, there’s no detergent and I am too lazy to go buy some.” Had enough clothes, considering a week of those three was spent in Florida running around half naked. However, there’s always the underwear conundrum.

It’s wonderful, that blissful period of time right after doing laundry when pretty much every item you own is clean. So many possibilities of things that you can slap on your body at any given time! And I am always excited when I have a giant pile of clean underwear. I usually start with whatever’s new and comfortable and vaguely exciting – at the moment, my preferred underwear is a tie between a fabulous rainbow pair from Old Navy, and some polka dot pair I got half off from some department store or another (tacky is how I roll). And for the next week or so, it’s an easy progression from there. But at some point, the really good underwear runs out. I start working my way through the pairs that are a bit frayed, and the pairs that only work with some pants, but not others. After that comes the poochy underwear. At some point in the past few years, I dropped a pants sizes or two, and as a result I’ve got underwear a size bigger that they really should be. Can’t make myself throw them away, as they’re perfectly acceptable, but nonetheless they’re definitely further down the line when it comes to things that are comfortable. Then, after those are gone, comes the “stupid underwear that I bought off the discount rack that kinda fits but not really.” I pretend they fit, so I don’t feel bad having blown dollars on underwear that doesn’t fit me. And after that comes the “sexy underwear that really shouldn’t be worn except for sexy time.” You know, all good and well during sexy time, but not so much for the rest of the day. And then comes the “sexy underwear that shouldn’t even be worn during sexy time because it’s so frikking uncomfortable.” I usually don’t ever hit that point. When I’m being good about laundry, I’ll usually not get past the “size too large” stage. But I totally slid this time, slid waaay too far. All I’ve got left are bizarre chunks of fabric with strings hanging off in mysterious places, chunks of fabric that masquerade as underwear but aren’t really underwear, just torture devices for when I get lazy and don’t do laundry.

In any case, I did my laundry. It’s sitting there staring at me, wondering why I’m typing this post rather than putting it away.

Pak’ma’ra Icon Painting Success!

I finally finished the Pak’ma’ra icon painting. Yay!

Pak'ma'ra icon painting

It was fun putting gold leaf on it, aside from having to scrape it off of places it wasn’t meant to get stuck, that is. Oil painting is also both fun and exasperating. It can take forever, but is so much more interesting then acrylics at times. So I’m trying to decide if I’ll do another icon-style painting next or not. Have also been debating doing some portraits of either extinct animals or insects. I seem to have more fun painting critters then anything else.