Limi’s Sphere of Influence

dabbling, frivolling, idling, loafing, loitering, playing and procrastinating

If you use Synergy with Ubuntu and a Windows system you may find when you press the @ key, you infact end up with the Ω symbol, which is’nt very useful (especially if your coding Rails).

After some quick searching, I found a blog and some forum discussions about the fix, granted it took 2 years from thread starting to solution being provided, but this is it…

xmodmap -e “keycode 53 = x X greater greater greater greater”
xmodmap -e “keycode 52 = z Z less less less less”
xmodmap -e “keycode 24 = q Q at at at at”

As i’m sure you’ll agree, thanks go out to those involved! No more copy pasting one from the Windows machine! :D

Catch up time

So I think it’s about time I give a general update as to where I am with my various personal projects…

Snapr Photo Gallery

I had Snapr running on my local server for quite a while, however it being there meant I couldn’t really show my photos to the world as it depends on my ADSL being stable/fast. This also put a burden on the Internet connection which I can’t really afford since when I’m not coding, I’m usually playing games or hosting games, and to randomly have my upload disappear wasn’t great. So about 8 months ago it got turned off, however, as my holiday is quickly making an appearance I might resurrect it’s code base, but with whats going on at the moment I doubt I’ll be able to get it working again in time.

GOW Take 2

I’ve been meaning to move away from Wordpress for a while, not for any particular reason, but other than I’d like to have coded my own; especially since the closest I’ve gotten to coding a blog in rails was a very simple one for part of a big website. I want it to support all the basics such as trackbacks/pingbacks so that there is no major blog downside from using it over Wordpress. This is coming together quite quickly at the moment, it isn’t going to be a Wordpress clone, as I have no intention to support multiple themes/users. I think I’ll release the code base when its finished, but with no intention of supporting/maintaining it beyond security issues.

I Watched That

This is a project I’ve had on back burners for nearly 2 years now, it’s basically last.fm for the TV world. So you can mark which shows you watch, comment on episodes, and mark specific seasons/episodes as watched so that you can keep track of what your yet to view. This would also include a recommendation/suggestion engine, along with the usual social networking side of things. Initially started on a really old version of Rails, it’s currently being upgraded to the latest Rails 2.3.2. Taking much longer than I initially thought as most of the code I wrote back in the day is well… not so good. So big chunks are being re-written to make them more efficient and to satisfy the part of my brain that’s a perfectionist.

Host Controller

This was originally a XP only utility that I used to use while developing on Windows. It allows you to toggle entries in the Windows host file on and off whenever you like. After I switched to developing on Ubuntu I had no real use for this application, and since then it remained in a working state for XP. Since now I have a Vista machine I decided to give it a little go just to make sure it still works. Had to make some small tweaks to get it operational again, however it’s now in a working state for how my machine is setup. (So chances are, it probably won’t work on your Vista machine). I need to support UAC, which currently it doesn’t. But beyond that, it’s a small cheerful program that does its job. If you want it, you can find the source code on github and a download of the application can be found here.

So quite a quick round up on whats going on, will hopefully post some more around the Rails blog, since that’s what I’m working on at the moment in my free time. A post on default_scope is definitely on the horizon.

I recently upgraded a laptop of mine from Intrepid Ibex to the Jaunty Jackalope beta, and wanted to get Rails development up to speed on there. However it seems that I fell into the usual pit hole when installing Ruby on Ubuntu that simply going…

sudo apt-get install ruby

…isnt enough, and doing so will produce this lovely error…

extconf.rb:8:in `require’: no such file to load — mkmf (LoadError)

So, to combat this, you need to do instead…

sudo apt-get install ruby1.8-dev

or for Ruby 1.9…

sudo apt-get install ruby1.9-dev

And then the error will magically disappear.

How didn’t you know? Every mother and his dog is on the train to flogging gamers for all their worth, so why aren’t you? Soon you can be making the millions from this clearly untapped market!

Honestly, there’s been loads of attempts that clearly worked, just look at these websites for ideas on how to run your own games for cash website!

  • BattleFrag
  • Prizefight
  • Gamelio
  • GoBlam!
  • Tournament.com
  • Kwari

Now all these sites have one thing in common, and its not that they are all making lots of money, it’s that they’re all shutdown.

If you have been in the gaming scene in the past 5 years you should have heard of at least one of the above mentioned companies, and you know that they weren’t successful. Which is a shame, but that’s just the way it goes.

They all have fallen into this same trap…

Step 1
The top players make money from beating the less skilled players.

Step 2
The top players rake in the cash, while the low skill players leave and don’t come back and don’t recommend your site.

Step 3
You attempt to attract new players by giving them free money to play with since all but the top skilled players have left.

Step 4
See Step 1.

I do hope that one day, the new budding entrepreneurs out there will look at the past efforts of this and go…

“Oh, look, there’s been other people who tried this, and from the looks of their websites it didn’t work out too well for them as none succeeded, perhaps we should try another area in gaming instead”

…and then leave it at that and try something else. Instead it seems to go like this…

“These other people failed at this, so let’s copy them, put a different spin on it, and then get the gaming sites to post news for us about how this time, it’ll work”

So why this post? There’s a new bunch of people on the street who think that they have the answer on how to make money from cash gaming (needless to say; whatever it is, it won’t work). They are called PlayAll; bets anyone on how long they’ll last?

In patch 3.0.8 Steady Shot was nurfed by 10% damage, so I have re-written my mashable macro a little to weave in Arcane Shot to increase it’s damage.

#showtooltip Auto Shot
/cast Kill Shot
/castsequence reset=shift/target Hunter’s Mark, null
/castsequence reset=target/3/alt Arcane Shot, Serpent Sting, Steady Shot, Steady Shot, Arcane Shot, Steady Shot, Steady Shot, Steady Shot

Basically the same as the first version I made, which you can find here along with the explanation on what everything does.

Right, as we all know back in the days of old Napster ruled supreme. There was no contest about that and everyone I knew who was on-line was using it, however it obviously was highly illegal. Since then many companies have tried to ressurect Napster in many different forms from Kazaa to LimeWire. However they all still fall in the pitfall of being illegal. So what would happen if a legal alternative occured? Well, it’s no longer what would happen, as its now happening with Spotify.

So how does Spotify work?

Well, it’s simply a Windows/Mac on-demand streaming audio. There’s no waiting, and it’s so quick there’s no buffering either. You can scan through the tracks at will without having to wait for it to catch up with your track.

How do they make money?

Every 10 odd tracks you play you have to listen to an advert thats about 20seconds long. It then goes back to playing what it told you too.  If you don’t want to ever listen to the adverts you can get a subscription, one is just for a day, the other for a month and during that time you won’t hear any adverts at all. If you stick to free, it’s a bit like listening to a real radio station, just they always play good tracks ;)

How good is it?

Well ive only been using it for about an hour, but from initial impressions, it looks and feels great. All the artists I searched for were available for play, along with massive back catalogues for all artists. You have the ability to queue up music to play, and you can also create playlists.

One thing that pleasantly surprized me about it was the fact it has last.fm scrobbling built in, just simply put in your username and password and off it goes…

Listening now using Spotify

You also have the option to listen to generic radio stations of which you can tell it what you like. So for example you can tell it you want to listen to music from the 90’s pop, or 80’s disco and pop.

How do I get it?

Ah the most important one of all. Currently Spotify is in an invite only stage, however it seems that if you visit this cunning link, you can by-pass all that! However no guarentees on this working for too long!

https://www.spotify.com/en/get-started/

- Ninja Edit -

Just found a rather useful Greasemonkey script that adds little notes next to artist names and track names on last.fm, and when you click them it will search in Spotify for playable tracks. More information over here.

WARNING - THIS MACRO HAS BEEN UPGRADED, THE NEW VERSION CAN BE FOUND HERE

After a very long stretch of not playing around with macro’s in WoW, I decided to see just how far the legal macro system could be pushed. After various browsing, testing and changing I’ve come up with a key mash macro…

#showtooltip Auto Shot
/cast Kill Shot
/castsequence reset=shift/target Hunter’s Mark, null
/castsequence reset=target/3/alt Serpent Sting, Steady Shot, Steady Shot, Steady Shot, Steady Shot, Steady Shot, Steady Shot, Steady Shot

Now what does it actually do?

Start auto-shooting, then if it can, cast Kill Shot, otherwise (if shift is pressed or target has changed) cast Hunter’s Mark, after that cast Serpent Sting, followed by 7 Steady Shots (will reset if target changes, alt is pressed, or if macro is’nt used for 3 seconds). It has not been designed to cope with the Glyph of Serpent Sting, but if you do have that glyph changing this macro is as easy as adding 2 or 3 more Steady Shots.

This is designed to keep Serpent Sting on your target at all times, so that the bonus 10% damage from Glyph of Steady Shot will be applied on all your Steady Shots. It’s debatable if kill shot should be after hunters mark, but I decided to put it at the start so that if you can kill shot you do it as soon as possible, rather than waiting for Hunters Mark + 1.5seconds GCD. It should also be noted that if hunters mark fades, it will not automatically re-cast it, you’ll need to hold shift to get it to re-cast.

Enjoy

WARNING - THIS MACRO HAS BEEN UPGRADED, THE NEW VERSION CAN BE FOUND HERE

An odd titled name for something that I had to remember how to do today. If you need to sort something by the number of its has_many object, eg…

Album has_many photos, listing albums with the most photos first
Forum has_many posts, listing forums with the most posts first
Group has_many users, listing groups with the most users first

…and you want to show these parents ordered by the number of children objects they have you need to do this…

a = Album.find(:all).sort { |x,y| x.photos.size <=> y.photos.size }

Obviously you can use named_scopes and conditions to restrict it down if you don’t want all of a certain object, either child or parent.

Hopefully this helps someone out.

  • 0 Comments
  • Filed under: Programming, Rails, Ruby
  • MGMT - Time to Pretend

    Just a quick post to say that this is probably my track of the month. Originally found it through the film 21 and it also just got awarded “#3 Hottest New Music of 2008″ by Last.fm

  • 0 Comments
  • Filed under: Last.fm, Music
  • Had to go look this up today as we are using more named_scopes at work now, although couldn’t off the top of my head remember how to get a named_scope to take an argument nicely. Anyway, the solution is…

    named_scope :recent, lambda { |*args| {:conditions => ["created_at >= ?", (args.first || 10.minutes.ago)] } }

    Hopefully this helps someone out

  • 0 Comments
  • Filed under: Programming, Rails, Ruby