no such file to load -- mkmf
Today I was attempting to install a package on my ubuntu machine and I received the following error:
extconf.rb:1in 'require': no such file to load -- mkmf (LoadError)
To solve the problem, I simply installed the ruby1.8-dev package, this was done by the command:
sudo apt-get install ruby1.8-dev
I could then happily install the package I wanted.
Making my blog suck less - Syntax Highlighting
Following on in the series of how I have improved my blog, its time to address the issue of syntax highlighting. I admit, this is something which I think has really let me down and something which is long overdue.
There are a number of difference approaches available to solve this problem, however the best approach I came across is from http://alexgorbatchev.com/wiki/SyntaxHighlighter. This is a javascript+css library which can be installed on your blog, which thankfully is a very simply task. The CSS you need to reference are the following:
The javascript I have referenced in shown below.
In my posts, I can then simply wrap the snippet in a pre block and assign the appropriate brush class to highlight the syntax.
public string test()
{
return "abc";
}
The following are a list of brushes for the different languages I have referenced.
C# - c-sharp
CSS - css
JavaScript - js
Java - java
Ruby - ruby
Python - python
Scala - scala
SQL - sql
Xml - xml
For those who are using Windows Live Writer, there is a plugin to make syntax highlighting even easier! This is available to download from http://www.codeplex.com/precode
Hopefully this should make code much easier to read in the future. Another approach I was tempted by is using GitHub Gists. Gists are snippets of code hosted on github which you can then embed into your posts, as shown below.
The reason I didn't go down this route is that it makes it difficult to insert code when writing a blog 'offline' and when GitHub is down. As a result, I decided to stick with the classic approach for now. But what do you think?
Labels: Blogging
Making my blog suck less - Retweet (via @Tweetmeme)
< script type="text/javascript" > tweetmeme_style = 'compact'; tweetmeme_url = '<$BlogItemPermalinkUrl$>'; tweetmeme_source = 'ben_hall'; < script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" >< /script >
Making my blog suck less
While I've been blogging for a number of years, my theme and layout has never really had my full attention. This has resulted in a number of issues, poor experience and finding older content more difficult than it needed to be. As such, I've decided to give the site a face-lift. A lot of this has been inspired by Scott Hanselman and the tips he has given to improve his blog.
This post covers the initial changes I have made, why I've made them and some tips you could apply to your own site if you wished.
1) Added a notice bar
At the top of every page I have added a notice bar with links to various internal and external pages which I would like my readers to pay attention to and visit. These include various social sites such as GitHub and Twitter with the hope that by having them in the notice bar people will be able to more easily identify them. Of course, there still needs to be excellent content on those sites, but making it easier for readers to access should be a high priority.
2) Making my favourite personal posts easier to find
There are a number of posts which I'm proud of which new visitors might be interested in and as such I wanted to make it easier for people to find. The aim is to reduce the bounce rate of visits from search engines, but also ensure that this content can be accessible to anyone who might be interested in what I have written previously.
3) Clean HTML
One of my personal bug bears at the moment is having clean(ish) HTML and CSS. I used to let this slide, but over time I've come to realise just how important it is. Not only does it improve compatibility across different browsers, but it also improves the load-time as the HTML is more streamlined as well as allowing for a more consistent look across the blog. The added advantage being that the html is now in a maintainable state meaning I'm not scared of updating the template like before. The problem with this is that things might not look 100% correct - if you notice any problems with formatting, then please let me know.
If you visit my homepage, you hopefully will notice a number of other changes some of which I'll cover in later posts. I'm hoping you will find some benefit in my new changes. If you think there is anything else I need to change, then please let me know.Labels: Blogging
Mono XSP == OSX ASP.net Web Server
xsp2
Listening on address: 0.0.0.0
Root directory: /Users/Ben/SourceControl/iPhoneWebApp101/iWebKit/Base
Listening on port: 8080 (non-secure)
Hit Return to stop the server.
Great for prototyping and rapid development and while I haven't tried it, it should work on Windows equally as well.
Labels: Mono





Social networks
Twitter GitHub SlideShare