Embedded Gist Missing Scrollbar ?


octocat

Embedded Gist missing scrollbar ? Using bootstrap or similar ? You’ll kick yourself. Bootstrap et al set CSS whitespace: wrap; to keep text inside the columns, and your embedded gist inherited it. Now it has no horizontal scrollbar and the text is wrapping around. This looks particularly hideous on mobile. Fortunately, the fix is easy peasy.

You just need to do this in your stylesheet :

.gist .line {
    white-space:pre;
}

And the Gist takes care of of sorting out its scrollbars and not overflowing the boundaries of the column.



WordPress Extra Excerpt Plugin


wrench

Because I like to show some summaries of recent posts on the front pages of the site, I have been using Wordpress’ ‘excerpt’ functionality quite heavily. However, even with various hacks, this leads to the unsatisfactory situation where some of the excerpts are truncated and/or the excerpt used on the blog home page is shorter than it really needs to be. Here’s the second simple plugin that I refactored out of my sprawling, hairy functions.php



Embedded Gist Line Height Mismatch Fix


css

I noticed that my (and quite a lot of other people’s) embedded gists were experiencing some drift between the line numbers and the code. This seems to be due to a mismatch between the line height and font settings on the line numbers and on the code, probably due to some elements inheriting body styles and others not, and code line fonts being set in %. (I think, I’m no CSS wizard, as you can probably tell). You can fix it by setting the requisite styles in your CSS something like this :



ObjC App Broadcast Singleton with GCD


plug

So I was running some spikes before building Enigmatic Ape’s first ‘proper’ (in the sense that it will be marketed and expected to generate revenue) app. I want to build it around a completely decoupled messaging architecture so that I can split it into components that don’t need to know anything at all about each other, including what other components exist, or don’t exist.
The way we do this in Objective C is by using NSNotificationCenter. Like much of Obj C, syntax tends to be a bit chatty, and a typical call to send a single message looks like this (and this is the short version)

[[NSNotificationCenter defaultCenter] 
    postNotificationName:someMessage
    object              :someObject
];

I didn’t want to keep typing that, so I decided to wrap it in a simple C call so that I could just type broadcast(@"some message"). In doing that I lost the object: parameter, which meant that none of my messages had a sender id. When you add an observer for messages, you get to filter based on the message name and the sender, and I had set up a debugging listener to listen to all messages coming from my first component under test. Naturally this broke [… more …]



The Apple App Store And UK VAT


calculator

As part of Enigmatic Ape’s ongoing start up I was at a ‘Legal Issues’ workshop at the North East Business and Innovation Centre the other day. It was excellent and I thoroughly recommend it for anyone in the NE who is just getting started, or thinking of getting started in business. While we were chatting about the advantages (or otherwise) of being VAT registered, I realised that I wasn’t quite sure about the status of App Store sales with regards to VAT. We came up with an answer we thought was right, but it was clear that a little more research on my part was required to make sure it actually was. This is what I found out.



Things You Should Know Before You Run A Facebook Or Twitter Contest


6958_wpm_lowres

“RT to Win Free Stuff” is a pretty common thing to see on Twitter these days, and a variety of competitions and contests are run via Facebook. My personal twitter stream contains enough beer and crisp manufacturers to suggest that they’re a good promotional tool as well as a way to meet fun new people on social media. Enigmatic Ape is going to be running a couple of these in the near future so I sat down and had a good old look at what’s involved, Here’s what I found out during my research.



Tim Berners Lee Is Wrong


9516_wpm_lowres

And verily, the Great Father did speak, and the people listened. And the tech press did gush, as is their wont and their function. And they did report his words, as is their wont and their function, without even so much a critical thought between them. And the people of the tribe of coders did nod sagely. Which frankly, is a something of a shame, because, verily, it was a load of old toot.




Built With Bootstrap
Powered By Wordpress
Coded By Enigmatic Ape