CSS 2.1 Selectors

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Thursday, 26 March 2009

CSS 2.1 Selectors
attribute selectors:

  img[alt]        = all imgs with alt
  a[title]        = all anchors with title
  p[class='rank'] = all paragraphs with class=rank
  div[id='rank']  = all divs with id=rank

  q[cite*='http://www.andy.com/']
                  = pattern matching based on only part of it's attribute


child selectors:

  div > a = all anchors that are children to the div
      <div> (unstyled)
        <a> (styled)
        <a> (styled)

  h2 + p  = next sibling to the adjacent h2 element
      <h2>  (unstyled)
      <p>   (styled)
      <p>   (unstyled)


pseudo-classes:

  div.news p:first-child  = first child of the div element
      <div>
        <p>   (styled)
        <p>   (unstyled)

  input[type=text]:focus  = applies where the element has focus

  blockquote:lang(de)     = where content is in a particular language
      <blockquote lang="de">


pseudo-elements:

  p:first-line          = applies to first line of any text in the page
  p.intro:first-letter  = applies to first letter or digit of the paragraph

More here

Other Operations
include
  @import url "style.css";

selectors
  #branding = id
  .content  = class

hex colors
  #000      = black
  #fff      = white

attributes
  body {color: #fff;}

nested examples
  a.gb2:hover {margin: 0 0 0 0;}
  .content p {padding:0;}

Practical Programming + RSpec

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Thursday, 26 March 2009

Bought some more pragmatic guides, do enjoy those books; they're really well-written and thoughtfully laid out. The first is a beta book focusing on Computer Science using Python to demonstrate applications. The second is on testing which I'm gonna read thru today, kettle's on so chat later.

XEN-side I requested the IP addresses for the virtual machines & got them approved via RIPE, so I'll start creating them later today to provide as test boxes for client apps.

P.P.S. Ubuntu 9.04 looks to have reached a stable point, today is it's first beta release according to the roadmap. Interface is a major cosmetic improvement, plus it comes bundled with ext4 from the get-go. Good work.

All the best,

WeFollow

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Tuesday, 24 March 2009

Added myself to wefollow.com, a user-powered twitter directory. Done the same for Michelle, simple & quick, nice stuff.

Installing XEN on Debian Lenny

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Monday, 23 March 2009

Really needed to virtualize the server as I can't waste all those resources, so first tried vmware which was ok but I'm not that big a fan; I really wanted to go the XEN route.

So, after some experimenting with a dev machine I finally bit the bullet & installed it.

Check Support

The server processor is an AMD with an ASUS board, so first check you can support virtualization

grep "vmx" /proc/cpuinfo

For AMD, look for SVM, for Intel look for VMX.

Install Xen

Next install xen, 'from here on in, it gets scary fast'

aptitude install xen-linux-system-2.6.26-1-xen-amd64 xen-utils-3.2-1 xenstore-utils xenwatch xen-shell xen-tools
Setup

You're not out of the woods yet, edit /etc/modules if you're after image-based virtual machines; skip otherwise.

nano /etc/modules

...change
loop
...to
loop max_loop=64

Save then edit /etc/xen/xend-config.sxp

nano /etc/xen/xend-config.sxp
  • Find (network-script network-bridge) and uncomment
  • Make sure (network-script network-dummy) is commented
  • Make sure (vif-script vif-bridge) is uncommented

e.g.

(network-script network-bridge)
#(network-script network-dummy)
(vif-script vif-bridge)
Checking

Now reboot

reboot

And check which o/s you've got

uname -r

Mine returns...

2.6.26-1-xen-amd64

more here

First Short Film + Thriller Dance

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Sunday, 22 March 2009

Today we mapped out the idea for our first short film, a suspense movie.

Plot sounds great, not to complex and if the weathers right the location we've picked out should work perfect. Going to try & shoot it later on this summer, need to get approvals sorted, scripts, and storyboard it but should be a lot of fun.

If all goes ok, I'll build a site to publish it, and break the making-of into some short tutorials to explain our choices, etc. Hoping this'll be a regular occurence.

Keep you posted.

Prison Thriller!

"1,500 plus CPDRC inmates of the Cebu Provincial Detention and Rehabilitation Center, Cebu, Philippines at practice! This is not the final routine, and definitely not a punishment! just a teaser."

Wedding Thriller!

"Surprise thriller for the folks at the reception."

Movie Thriller!

My personal favourite from 13 going on 30

Rails 2.3.2 + Ruby 1.8.8

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Sunday, 22 March 2009

Have plans to virtualize my server so the blog and all other important parts are getting pushed over to a new temporary home while I map it all out. With that I thought it might be great time to see how things cope with Rails 2.3.2 and the latest stable snapshot of Ruby 1.8.8.

Points to note, I had to change my application.rb file to application_controller.rb for the new 2.3.2 layout, done simply with;

rake rails:update:application_controller

And when compiling Ruby 1.8.8 (1.8.7 is the official stable mind), had to edit line 5 of version.h

from...
  #define RUBY_PATCHLEVEL -1
to...
  #define RUBY_PATCHLEVEL 1

Without this, RubyGems won't install, complaining about the version (1.8.8dev). This changes it to 1.8.8p1 for which RubyGems will no longer complain at.

So far, memory & speed are churning out good, used linode for this one as they offer 32-bit builds which are perfect for the job.

Ruby vs Python

"Each have a culture that defines them. Python is built around 'There's one way to do it' unlike Ruby which takes Perl's mantra 'There's more than one way to do it.'"

Thanks TopFunky for this,

Rails Examples

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Friday, 20 March 2009

'RAKE ROUTES'
  • Rake Routes by Ryan
Don't Repeat Yourself (DRY)
Has And Belongs to Many vs :Through
  • Differences between HABTM and :THROUGH by Josh Susser
Securing Feeds
SSL in Rails
Blocks & Closure
  • Conversation with Yukihiro Matsumoto on Blocks and Closures in Ruby by Bill Venners
On a less serious note...

Woah little NSFW with the language but those are some pretty striking IE6 splash pages Joe Lifrieri. Don't think they'd pass approval, but worthy of a friday post ;-)

Hitchcock, Who-Dunnits, Cameos & Must-sees

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Friday, 20 March 2009

Hitchcock is one of those directors who I never tire of watching his works on the big screen or laptop. I understand why he only ever did one who-dunnit in his life, because once the audience knows who perpetrated the crime the reason for the story is over and serves no purpose any more. By focusing on the suspense and drama of the events unfolding he makes the story more riveting and enduring.

On one part of the book Hitchcock/Truffaut he even mentions the case of two rival channels, where seeing that the first channel is showing a who-dunnit, the other gives away the ending in order to grab their viewers. It must have been a lot more under-handed back in those days. I think this explains why I've watched movies like Lost in Translation much more than The Village or Sixth Sense, because once you've seen it there's lesser a need to re-watch as you already know the guy is really just a ghost.

Found a collection of Hitchcock Cameos, think I must have seen pretty much most of all his films; apart from Frenzy which I've avoided as it might ruin any memory of his better works.

Top 12 Hitchcock Movies You Must See

Well in my big collection I think there are 12 you really must see which I enjoy the most, in no particular order

  • The Lodger ...silent & engrosing
  • Rebecca ..."why don't you...."
  • Rope ...very technical film & polished storyline
  • Rear Window ...cheers me up whenever i'm sick in bed
  • The Man Who Knew Too Much (b/w)
  • Strangers on a Train ...saw this on the big screen at the NFT
  • Lifeboat ...will they survive?
  • The 39 steps (b/w) ...mr memory knows all
  • The Birds ...how similar is Signs to this?
  • Notorious ...gripping & great ending
  • North by Northwest ...the crop-duster scene is a classic
  • Vertigo ...well worth the watch

Let me know what you think, all the best.

CodeKata

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Thursday, 19 March 2009

Today I went off to visit Nature Publishing, they've got a good bunch of people down there. Was actually quite beneficial as out of talking I found out about Dave Thomas's CodeKata blog, where he regularly posts ruby problems to make you essentially a better programmer; guess I'll be burning the midnight oil with this one, fun stuff ;-)

what a day...

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Thursday, 19 March 2009

Michael Sheen

From dashing to meet people, the tube and my phone ringing like it's possessed, to discovering the premiere of The Damned United and meeting Michael Sheen it been some kind of crazy day.

Michael was quite a nice guy to talk to, well spoken and charismatic; I hope the film does well for him. Looking back I remember seeing Brian Clough on tv as a kid with my parents, however I was never that into football as the lure of film-making and it's creative process always took hold of me, but I will definitely give this film a look, anything with Timothy Spall's got to be good (he was great in Shooting the Past).

Hope things are great in your part of the world.

mandy.com

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Wednesday, 18 March 2009

Michelle (my other half) is on the hunt for something new, with her freehand & architectural skills she's hunting around for her dream area 'set design'.

So tonight while I was coding away at the ruby json parsing libraries I heard her shout 'eureka!' and I knew it was good news.

There's a site called mandy.com which lists a lot of short-term jobs in the film & media industry, she's looking at a 'prosthetic casting' role now.

I do hope she gets something good, she's been longing to do something like this for years; I'll happily back her for whatever it takes. Should be awesome.

Good one Michelle!

p.s. if anyone knows any other media job boards, please drop her a line...

Watchmen Opening Credits + Review

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Saturday, 14 March 2009

Watchmen

--------- Spoiler Warning ---------

I've just read the writeup Total Film gave Watchmen and I have to agree it is a lot to take in if you're new to the story and haven't read the book.

From the opening credits which setup the backstory (see below) you instantly get a feeling these guy's really put a lot of love and effort into creating this masterpiece. Ok, it isn't for everybody, the good guys don't always win and not every cloud has that silver-lining but then the world we live in isn't such a pretty picture when you look between the lines. The superheroes are flawed, mothman goes insane and is carted off to the asylum, the comedian isn't nice with the ladies, and the Night-owl has performance issues, not to mention Rorschach's poor people skills.

This is definitely not another comic-book movie.

I went to see this recently with my fiancee Michelle and a couple of my friends and the reaction was very varied. Some thought it was too long (3hrs), some thought it was too slow and took too long to get to the action. One guy next to us kept dozing off but for me I was just in awe, I was really taken back by the attention of detail the cast and crew underwent to re-create the comic on the big screen perfectly. Some bits were altered and a few were left out (like the explanation of Rorschach's mask), but so much was crammed into those 3 hours that you could never get in just one sitting.

From the start it felt like watching Blade Runner with the rain, neon lights and dark corners. Then we see Rorschach picking up the pieces of The Comedian's untimely death, then visiting Dr Manhattan's laboratory where we meet Sally Jupiter and so on. There's lots of cameo's with Annie Liebovitz photographing Adrian Viedt, Fidel Castro, Richard Nixon, Andy Warhol and then all those little characters and locations from the book The Gunga-Diner, The Newspaper Stand, the kid sitting on the corner reading his comic, The Frontiersman, Moloch's place all beautifully rendered straight out of the book and acted superbly. No big name star trying to steal the limelight, just a solid and truthful rendering given life on the silver screen.

Looking back I can't even imagine the kind of problems they must have had creating this, just keeping it quiet must have been a security nightmare. And then making sure it was done correctly and without people changing things to fit in product placements or such, Zack Snyder must have called in some pretty big favours to keep it's vision. The casting must have been difficult, what I found staggering was the level of detail they gave even tiny two second props was just incredible. If anything this film's destined for an oscar for the art work & costumes alone.

I also loved the choice of songs, Bob Dylan's 'Times are a Changing' was a perfect choice for the opening setup. Then Hendrix 'All Along the Watchtower' when things were getting hairy. Didn't quite get the lovescene song, and to be honest it was a little funny, but the prison scene was absolutely spot on, disturbing and dark.

I'm off to see it with my old boss next week, can't wait. It was exactly what I hoped for in a film. Gritty, dark and artistic. 5 out of 5 easily.

Courtesy of yU+Co