Archive for category Random Musings

MapMyUser.com wordpress ‘hack’ means new theme for the site!

I call this a ‘hack’ but in reality there was no breach of security, it was a clever little trojan of sorts put into my old theme by it’s creators.   What I’m talking about is the sudden appearance of a little tab on the right hand side of the page that messed up my entire layout.  It was a little advert for a website called mapmyusers, which in itself seems pretty tame and safe, nothing too nefarious looking but the point is that it was put on my site without me knowing about it..

In the end I found that it was being called from the footer.php page and it wasn’t the only thing being called.. An entire subpage was being pasted on the bottom of my blog:

Internet Marketing Reviews by Jayson Hahn is what it was called and the theme was called ‘Life Cycle 1.00 by themepriview’

So if yuo’ve gotten this, change your theme and the problem will go away

Finally got me to change themes on this site, lordy lordy the old one was 3-4 years old.. Not that the new one is all that modern, but it was the next inline in the installed themes I had handy.. too lazy to go find a new fancy theme for this blog

Tags: , , ,

Color erase not working in GIMP?

So after wasting oodles and oodles of people’s time assuming this was a bug and not a human fuck up, as it usually is, I’ve learned that you need to have an alpha channel for this to properly work.

The problem was the paint brush’s ‘color erase’ mode wouldnt’ actually erase colors, it just acted as a normal paint brush.  After filing a bug report and going back and forth a little bit I was asked if I had an alpha channel turned set for that layer, which of course I didn’t, and that solved the whole thing.   So do yourself a favor and make sure you read instructions properly, unlike me: http://docs.gimp.org/2.6/en/gimp-tools-paint.html

Tags: , , ,

I now have the quietest laptop around, and coincidentally the hottest

Well the inevitable decline of this LG R405 laptop is finally upon me as today the main cooling fan gave out.  I’m hoping that this might be a simple loose wire that I can soder or reattach but alas I left my tiny screw driver in Canada and so I can’t open this old girl up to check :(   But she started overheating something fierce today so I went into the bios and changed the cooling fan settings from normal to loud/cool and upon reboot the laptop switched to silent/off/hot mode as the fan just stopped spinning.  I was able to last about 15 seconds booting into linux before it overheated and shutdown but fortunately due to some overheating problems while in Colombia I had an undervolting utility setup in XP so I could boot into that and with the clock running switch it on quick and throttle my Cpu from 1.6GHZ down to 450mhz or so to prevent it from heating up.

But for me, stability in XP is still worth less to me than 15 seconds of instability in linux so I rebooted and performed mouth to mouth on the old girl, blowing into the exhaust port to offset the lack of a fan, keeping her cool enough to get through the boot cycle and allow the cpu to go idle and cool back down again.

Very fortunately for me in my latest foray in system customization I installed CairoDock, and very very fortunately for me Cairo dock has a CPU frequency monitor and adjuster called ‘CPU Frequency Monitor’.  All I really wanted to do was to put up a cpu temperature gauge so I could monitor the heat and keep my activity to a min but when I saw that frequency applet my heart soared.  Loaded that up and now my cpu is permanently throttled down 66% to 1Ghz, I also disabled one of my cores so I’m only running a single core on the chip, Ive turned off all graphic effects and dimmed my monitor by 60% to lessen the voltage flowing through the system and finally I removed the battery to get any heat from that away from my CPU.  In the end I’m able to work fairly uninhibited and even play a game of overgod without the CPU rising above 50 degrees.  I’m not going to be doing any Audio Visual work anytime soon and if worse comes to worse I’ll have to switch off wifi(the R405′s wifi nic is notorious for heat) and work in the coldest room in the apartment but I have a working machine for a little while longer until my long awaited AMD Fusion chips come out.

How ironic is it that this morning my power supply on my quad-core xeon server blew, frying the hard drives and forcing me to do a fresh OS install and emergency transplant the server to an older P4 2.8Ghz box and then just when I have that all squared away my CPU fan on this machine blows forcing me to underclock it by 66% and shut down one of the cores.

Oh well, even gimped and limping along you still have to marvel at what these machines can do.

So moral of the story, if your laptop starts overheating on you or worse yet your CPU dies and you can get it fixed immediately a short term solution is to do the following:

In Ubuntu:

  • Go into your Bios and shutdown one of your cores to cut your heat
  • Boot into linux, performing CPR to get your machine over that big boot time hurdle
  • Install Cairo Dock, it’s pretty spiffy anyways
  • Install the CPU Temp monitor applet to keep an eye on your heat levels
  • Install the CPU Frequency Monitor and clock it down to the lowest frequency.  I tried setting it to ‘conservative’ first but it still jumped up to 1.4 ghz so I just perma throttled it to 1ghz
  • Now that your system is stabalized you can go one step further and undervolt your machine and see up to 7 degrees less heat by following this guide: https://wiki.ubuntu.com/UndervoltingHowto

In XP:

  • Boot into XP, performing CPR if necessary to buy yourself enough time and follow this guide: http://www.clunk.org.uk/forums/guides/12900-guide-undervolting-your-processor.html .  I use RMclock personally as I find it’s options the most use friendly for getting the job done

This is all assuming you are running an intel chip and don’t have the handy bios options to adjust your frequency there, if so do it there first and go as low as you can while remaining stable and then dink around with the stuff above.

Right now I’m working normally and my cpu temp is sitting at 50 degrees, compare this to the 80 degrees it was at before and I’m a happy camper.  It’s also sitting on my lap and if I were to work on the table in a colder room it sits around 40

Tags: , , , , , , , , , , ,

Multi-Threaded Downloading with Wget

In the process of downloading a few thousand log files from one server to the next I suddenly had the need to do some serious multithreaded downloading in BSD, preferably with Wget as that was the simplest way I could think of handling this.  A little looking around led me to this little nugget:

wget -r -np -N [url] & wget -r -np -N [url] & wget -r -np -N [url] & wget -r -np -N [url]

Just repeat the wget -r -np -N [url] for as many threads as you need… Now given this isn’t pretty and there are surely better ways to do this but if you want something quick and dirty it should do the trick… Enjoy!

Tags: , , , , ,

Getting wordpress to print the post date in a title of a post

Wow, getting wordpress to print a few bloody words in the title of a post turned out to be a massive ordeal here.  For one of my projects I have a post that uses php (thanks to php-exec for allowing php be to be run inside of a WP post) to pull rss feeds and populate the post body with it’s information.  So what I do with this is I just have wordpress repost the same post every day (thanks to the plugin ‘reposter reloaded) but what I want to happen is for the title of the post to be updated every day with the date of the repost.  So I can say something like ‘New info for January 13th 2010′ and the date in that title will be updated to January 14th 2010 when it gets reposted tomorrow and so on and so forth.

Weeellllllllll this proved to be way more complicated than expected.. I was hoping, as with the other stuff that I would just be able to insert something like ‘the_date();’ into the title box and have php-exec automatically take that and miraculously transform it into the date but oooh noo, for whatever reason php is not allowed to be executed in the title.  Sure I can execute it in the body of a post, the excerpt but the title is just a little too sacred for that.  This left me with the fun task of mucking around with the template however I only wanted the date tacked onto the end of titles for posts that were in a specific category, but to make things even more complicated I didn’t even want it to go with a certain category, what I needed was for it to apply only to posts in categories that contained a specific keyword.

So what I had to do was create this little script that would look at the category which this post belonged, check this category contained a certain word and if it did it would tack on the date to the end of the title for the post.  Sounds easy enough eh?  Well I imagine for someone with a modicum of php and wordpress hacking experience this would have been easy but I unfortunately have neither of those things.  So 15 hours later or so it’s finally working :)   And to save you the time here it is, over commented for others with similarly limited experience in these matters:

Open up /wp-content/themes/YOURTHEME/loop.php (you may also need to do the same in single.php but I’m not sure if it’s necessary)

<?php
// lets find out what category this post belongs to and apply that to a new variable

$category = get_the_category_list( ‘, ‘ );

// Lets do the same thing but with the date

$date = the_date();

// now we need to look at the $category variable and see if it contains a specific keyword, in this case the word is ‘job’

$pos = strpos($category, job);
// If it doesn’t contain this keyword then strpos will return a ‘false’ value, in which case we want it to append empty air to the end of the title

if ($pos === false) {
echo ” “;

// Now if the keyword is contained in our search parameters what strpos does is returns a numeric value indicatin the postition in our search terms where our keyword starts.  We dont’ really care about that, all we care about is that strpos is return a value, any value that isn’t false and if this is the case then we have our $date variable tacked echoed as seen below
} else    {
echo “$date” ;
}
?>

Now what I did is I placed all of this inside the <H1> title tags in the single.php file.  So normally it would look like this:

<h1><?php the_title(); ?> </h1>

But now it looks like this:

<h1><?php the_title(); ?>
<?php
$category = get_the_category_list( ‘, ‘ );
$date = the_date();
$pos = strpos($category, job);

if ($pos === false) {
echo ” “;
} else    {
echo “$date” ;
}
?>
</h1>

Tada…

Tags: , , , ,

WordPress.com stats not working with your new theme?

Did you go and change your WordPress theme and now your blog isn’t tracking stats properly? Well luckily for you the fix is simple and painless.

Just go into your admin area and under appearance click on ‘Editor’. Open up the footer.php file and at the bottom just above the tag paste in this line:

<?php wp_footer(); ?>

And your done! Easy peasy!

Tags: , , , , , , , ,

Lillly Allen: Not Fair – My new favorite song

Just found her today and immediately fell in love with her style, lyrics and sound.  Her music is as unique as the video is, such a wonderful style in the face of commercial mainstream.  Just watching it makes me smile, but then I started paying attention to the lyrics and it got that much better.  The same is true for the rest of her album.

YouTube Preview Image

Tags: , , , ,

Yamaha Electone Stagea – Truly helping to realize human potential when married with technology

I was watching a performance on TED today of a young woman playing the Yamaha Electone Stagea.  Truly a remarkable piece of technology that allows the player to perform pieces that would normally take an entire orchestra.  The horns are always an instrument that I find electric keyboards don’t do justice but give it time and it’ll soon be indistinguishable from the real thing.  Either way I am inspired at how technology is allowing these gifted humans to truly achieve musical potential and greatness that had never been dreamt of until very recently.  One person composing and playing the entire role of an orchestra.  Truly amazing.

YouTube Preview Image YouTube Preview Image

A presentation of the Stagea

YouTube Preview Image

Best Use of Music in Video Game Trailers

YouTube Preview Image

Added Multiwinia to the top because A.) I’ve got mad respect for Introversion and their products but this trailer is just a bold brilliant move.  The piano makes you instantly sad for the suffering and pain of war.  The brilliance lies that you feel, albeit only slightly, this tinge of sadness for the scenes you are witnessing, when the scenes and the game multiwinia itself is so abstact that normally you would never feel this.  Great GREAT game, great company, wicked use of music and to make a trailer that essentially tells you nothing about the game who’s purpose is only to illicit an emotional response well that takes balls and brains, cause they pulled it off.

YouTube Preview Image

Such a beautiful song that lends itself surprisingly well to the trailer, a testament to those who created it.

YouTube Preview Image

You have to give them credit, the boys over at the M$ marketing department know better than anyone how to create a compelling experience with audio in a game trailer

YouTube Preview Image

Original WoW trailer.  The song on the soundtrack is called ‘A Call to Arms’(are at least it’s similar enough to see it was used) and is one of the most powerful game pieces ever written.  It’s too bad the song is slightly muted, worth listening to it all on it’s own here

YouTube Preview Image

I had to bring in a trailer from AITD as the 2008 OST is definitely one of the more powerful soundtracks created in recent years.

YouTube Preview Image

How many companies offer remixes of their commercials? I mean come on, the musical component in itself might not be worthy of a mention but it’s use and the fact that money was spent to pump this out sure as hell is.  Plus it might have the best last line for any trailer ever :)

YouTube Preview Image

One of the most recognizable pieces of music from any game trailer without a doubt.  I dare you not to get goose bumps from this.

YouTube Preview Image

Bravo!  When faced with the challenge of how to represent visually the music of the Beatles in a trailer they could have gone down so many cop out, traditional routes but instead they put their balls out there and made something beautiful and creative.

YouTube Preview Image

Beautiful song for sure, good call Ubisoft

YouTube Preview Image

I’ve had no choice but to smile ear to ear with every trailer for this game, but the music in this one makes me more than otheres :)

YouTube Preview Image

There can be no denying the brilliant pairing of Big Band style music with the visual style presented in TF2.  Both compliment and strengthen each other so well that one viewing of a TF2 commercial and it’ll be in your head for days.

YouTube Preview Image

The mellow guitar riff beautifully juxtaposes what is going on in the scene.  Plus the big band sounding theme for TF2 itself is brilliant.

YouTube Preview Image

The song just makes everything seem so serene and graceful, even when it involves violence.  I imagine that being the point EA was going for to describe the way the character in mirrors edge moves and acts

Got some more that I missed here?  By all means lets hear it!

***Additional Suggestions I Missed***

YouTube Preview Image

Brilliant, again the use of music to juxtapose what is happening in the music has such a great impact I am surprised we aren’t seeing this technique more

Tags: , , , , , , , , ,

Domain Registry of Canada – scam

http://www.twistimage.com/blog/archives/domain-registry-of-canada-scam-with-direct-mail-and-online/

If at any point you receive correspondence from these guys do what any sensible person does and take the return stamped envelope, collect some animal feces with it and mail it back to their address.  They are a huge scam preying on the general ignorance of people saying that their .ca domains need to be protected by them and only them for an insanely inflated price of 40.00 per year.  You can get the same protection, or better anywhere else for a fraction of the price.

Tags: , , , ,

Page optimized by WP Minify WordPress Plugin