Petes techie blog

A blog written for two people. Me and You.

Lets Get Started!

| Comments

I’m trying out a new blog engine called Octopress. My previous blog always had difficulty displaying code so I wanted one that was designed for techies (or geek if you listen to my wife).

Lets try a simple piece of code using markdown and backticks:

Discover if a number is prime Source Article
1
2
3
4
5
class Fixnum
  def prime?
    ('1' * self) !~ /^1?$|^(11+?)\1+$/
  end
end

And now with codeblock plugin

1
2
3
4
5
class Fixnum
  def prime?
    ('1' * self) !~ /^1?$|^(11+?)\1+$/
  end
end

Lets try a different language objective c

1
[rectangle setX: 10 y: 10 width: 20 height: 20];

Comments