Safari 3, Wordpress 2, TinyMCE and paragraphs
bgk on Oct 13th 2007
If you’re wondering why your paragraphs disappear when using the ‘Rich Editor’ features with Safari 3 and Wordpress, then look no further. Well, at least I can point you on the right track.
I first noticed this problem with the release of Safari 3 beta, and soon discovered that changing the UserAgent (UA) to Firefox eliminated the problem. I’d hoped it would only be a matter of time before the Wordpress folks undid whatever they’d done in their integration of TinyMCE. However, two point releases later and it appears the problem is still there.
So, this morning I made a very simple change to
$WPHome/wp-includes/js/tinymce/tiny_mce.js
Namely, line 33, do the following
// this.isSafari = ua.indexOf('Safari') != -1;
this.isSafari = false;
This removes all the Safari specific hacks and now my paragraphs work nicely. (You may need to quit and reload Safari for this to take effect).
Almost surely this breaks a whole bunch of things, but if you just need the basic editing features of TinyMCE, then until Wordpress gets their act sorted, this should do the job nicely. Perhaps someone with a bit more time can go through this same file and see which of the hacks causes the problem. See comments.
Filed in Computers | 2 responses so far
Welcome Joe …
bgk on Jul 16th 2007
Imagine the scene, early 1990s in the Learning Resource Centre (a fancy name for a library with some computers). It’s around 4pm and school had finished for the day. I was messing around and somehow got my floppy disk stuck in the drive of an Archimedes A310 (or 320?). I was a bit panicked and thought, as children tend to do, that I would get in trouble. Thankfully Steve (who I’d known since infants school) and Joe came to my aid with some tweezers(!), and we’ve been friends ever since.
It was Joe who first taught me how to program on those Acorns, I remember he recommended some arcane book on WIMP programming and I dabbled a bit. He stuck with the Acorn stuff and I moved over to PCs (Windows 3.1 was all the rage back then). Eventually he saw the light and moved to PC, and now we’re both Mac users?
Anyway, it seems Joe was inspired my the resurrection of my blog and decided to get his own blog on the go. Go and have a look.
Filed in Computers, Me | One response so far
Update complete
bgk on Jul 10th 2007
I have finished making some tweaks to the blog. For the most part the changes are cosmetic, although I have moved the blog into the root of ijneb.com, mainly because I never had anything of any substance there anyway.
I settled on a Wordpress theme called Freshy, by Julien De Luca. It has a very clean look and feel.
Let’s see how long I can keep it up to date.
Filed in Computers | One response so far
Back from my blog hiatus
bgk on Apr 7th 2005
I’ve upgraded to WordPress 1.5 and re-enabled the comment feature. Let’s see how bad comment spam has become!
Not much new to report yet (expect something significant towards the end of May)
Filed in Computers, General | One response so far
Regular service will be resumed soon!
bgk on Apr 22nd 2004
I’ve ditched the old software (MovableType) in favour of WordPress, and until I get around to designing a style this one will have to do! More in-depth entries coming soon!
Filed in Computers | No responses yet
I’m famous!
bgk on Dec 30th 2003
Well, kinda!
PS Happy New Year. Lots of thoughts coming soon to an RSS feed near you (in 2004!)
Filed in Computers | One response so far
GPSMap, Google and motivation.
bgk on Sep 23rd 2003
Inspired by the number of people landing on this page via Google searches for “Gps for Mac” and other related terms, I did a little bit of work on the GPSMap software this evening. I’d forgotten what little bits of Cocoa I’d committed to memory but fortunately self-documenting Objective-C and Apple’s developer documentation make it less painful
I’ve animated a little red dot at the current location and am working on support for waypoints now. I’ve only seen one piece of GPS Software before, so I’m not sure what features are desirable. Will keep hacking away until I’m happy that it’s useful and easy to work with, then I’ll release it here.
Filed in Computers | 2 responses so far
Removing an IPC/SysV semaphore on *BSD
bgk on Sep 4th 2003
Whilst playing around with mod_throttle, I somehow managed to use up all the of the System V semaphores in the Kernel space
and as a result could not restart Apache +modSSL (which tries to do a semget(), or so it seems!). I proceeded to spend the next 10 minutes Googling for a way to fix it without rebooting. 10 minutes is a long time to have to Google for something, some people probably give up after the first search!
So the purpose of this blog entry is to say if you’re having trouble with semget() returning No space left on device and you want to clear the active semaphores or reset them or whatever other keyword you might try when searching on Google with BSD, OpenBSD, FreeBSD or whatever *BSD you use. The command you want is:
ipcs followed by ipcrm -s ID where ID is the ID of the semaphore you want to nuke!
I hope this helps some lazy person out there who uses Google for everything — when it comes to command line tools remember apropos keyword > Google!
Filed in Computers | One response so far
GPS on Mac OS X
bgk on Aug 24th 2003
Just a few days ago, Joe received his GPS Mouse/Dome and we decided to play around and to see what good Mac Software we could find. Unfortunately there was nothing that quite met our needs and so I decided today to start writing something in Cocoa. Around 1930hrs I noticed a small red blip appear at Joe’s house on the map. Eureka, it was working!
The results so far and evidence of GPSMap working can be seen here (GPSMap, until I think of a better name - suggestions?). For the geeks techie folks around here, it talks to GPSd via TCP and plots the route on a map so far. Cooler features to come, including map downloading, auto map selection, waypoint/point of interesting setting.
Filed in Computers | 8 responses so far
Windows DCOM Worm
bgk on Aug 11th 2003
This makes interesting reading. All (three) Windows users that I have spoken to today have been affected by this “worm” which takes advantage of a problem discovered and fixed in July 2003. Imagine being able to run arbitrary pieces of code on other peoples machines … ! DCOM RPC makes it possible :).
Filed in Computers | No responses yet
RSS - Really Stupid System
bgk on Aug 1st 2003
I just Googled for RSS sucks and anti-mega: RSS. Sucks. was top. The point really isn’t that the aggregators suck, it’s that RSS sucks for some things.
Imagine waking up in the morning and having a few hundred ’special’ newspapers delivered to your door. The special newspapers arrive in the form of an unordered index and each article printed on a page. To find out what’s going on, read the index note the page number, then go and read the full article on the corresponding page. How do you know what the big issues are? You don’t! Where the structure and layout of the pages in the newspaper provided an efficient visual means of communicating “importance”, RSS gives you nothing but an index.
So, if anyone actually read what I wrote here, they might say, well that’s not a problem with RSS, just add a priority tag or something. It’s hardly the same though is it? The RSS mechanism: index + links, simply isn’t powerful enough to allow a reader to deal with whole swaths of information. So much work has gone into conveying structure with XML documents (RSS is simply an application of XML) and RSS simply removes that structure and gives you the bare essentials.
RSS has it’s applications, i.e. for seeing when infrequently updated sites change. Taking it a little further maybe it is suitable when getting your bank balance, account history, stock information. Ramming 350 stories into my aggregator and expecting me to sift through them is not a good application! It’s a bit too soon to start predicting the death of the browser.
Filed in Computers | No responses yet
More wordlist fun (Kata Eight)
bgk on Jun 26th 2003
It’s a well known fact that I have too much free time, and so I decided to have a look at PragDave’s Kata Eight. This time I got a fast solution right away, it’s a much easier problem to solve.
What would be interesting is relaxing the restrictions, so that the suffix and prefix can be anagrams and then trying to come up with an efficient solution, I spent some time over the past few days thinking about it, but didn’t get anywhere! Thoughts?
Anyway, here’s how I did (case sensitive combinations only):
[benji@mac Ang-Comb]$ time ./presuf wordlist.txt | wc -l
693
real 0m0.129s
user 0m0.050s
sys 0m0.040s
Here is the result list, does anyone concur? Does anyone care?!
Filed in Computers | No responses yet
A coding challenge
bgk on Jun 22nd 2003
On Saturday I somehow discovered the website of Dave Thomas and stumbled upon this little gem.
Essentially it’s a programming challenge and I spent several hours this weekend working on a solution in C that actually performed better than his Ruby(??) version. I’ve never even looked at Ruby, but I can only assume it’s like Haskell or something. Of course my C implementation rocks. Running in around 0.3x seconds on my 667Mhz powerbook (My initial implementation took over 5 minutes to run!).
[benji@mac Anagrams]$ time ./fastest wordlist.txt | wc -l
2531
real 0m0.327s
user 0m0.240s
sys 0m0.040s
His Katas are a really good idea and I’ll try them all at some point. I’d also like to see how well my algorithm performs in Haskell (and how much shorter it is …).
Anyway, enough technobabble!
Filed in Computers | No responses yet
Acrobat Reader 6.0
bgk on May 27th 2003
What a dog!! (on Mac OS X at least)
5.0 is 35.1mb installed
6.0 is 57mb installed
6.0 has no web-browser plugin and I think DFB could render PDF faster in his head. It also takes about 15seconds longer than 5.0 did to launch.
Poor show Adobe ! :(. Back to Preview for me!
Filed in Computers | No responses yet
iPhoto Templates
bgk on May 22nd 2003
Whilst waiting for my new HDD to arrive today, I thought i’d play around with iPhoto export templates. I found a nice plugin called BetterHTMLExport and the results can be found here. They are just some more pictures I took around Nottingham with the Ixus400.
Filed in Computers | No responses yet
HDD Update
bgk on May 20th 2003
So, there I am playing Age of Mythology with Jonno (kicking his ass as usual) when the game locks up. “Hmm, Odd” I though and rebooted. Jonno had saved the game so we resumed and a few minutes later the same thing happened. So I rebooted again:
“SMART warning: the HDD is about to fail”. Yeah, yeah, whatever; I had disconnected the hard-drive over the weekend I thought that maybe I hadn’t connected the power cable correctly.
Power down, jiggle the wires, reboot. XP fails to boot. Disconnect the drive, XP boots. Reconnect, XP fails to boot. At that point I remembered earlier in the day I had heard a strange noise coming from my PC, but I put it down to one of the many wires catching against the CPU fan.
Several hours later, after seriously abusing the drive with bits of metal, hammers and dropping it from various heights on to the floor I accepted the fact that I had lost the data.
Who cares, it was only 7 years worth of email, photos, code, applications (’95 - ‘02). Why didn’t I have a backup? Good question, I thought I did. A near total loss happened in ‘99 and since then I had always ran 2 HDDs in my PC with a manual copy of the data every few months.
Somewhere along the line I got confused and must have been making the copy to an alternate partition on the same physical drive. Another thing I vowed in ‘99 was to replace the drives every 18 months. This Fujitsu drive was made in ‘01, since buying the Mac I’ve neglected the PC some-what.
ZARNTFS has made a reasonable attempt at recovering some of the data on the disk, unfortunately it’s all the crap that I don’t care about, like fonts.
Oh well. Here’s to another 7 years.
Filed in Computers | No responses yet
bgk on May 20th 2003
The Anatomy of a Search Engine is a good read. Had a few spare minutes and decided to read the paper, interesting ;).
Filed in Computers | No responses yet
Reminder to self
bgk on May 19th 2003
Hard-drives are fucking unreliable pieces of crap. Never trust them.
Filed in Computers | No responses yet
CFSocket and NNTP!
bgk on May 2nd 2003
Today I’ve been playing around with CFSocket! Interesting eh? I recall years ago reading an MFC book and thinking what the hell is a “callback”. Funny how age (and a CS degree?) makes these things become oh-so-clear! ![]()
Why CFSocket? Well … since there are no decent NNTP readers and I could use a project to get focused and learn some more Cocoa/OS X coding, I’ve decided to set about writing one. Expect it to be completed around June … 2008!
Filed in Computers | No responses yet
New MS search engine?
bgk on Apr 18th 2003
Noticed some hits in my website log with the following UserAgent :
“MicrosoftPrototypeCrawler (please report obnoxious behavior to newbiecrawler@hotmail.com)”
and whois.arin.net says it’s a valid Microsoft address! Interesting …
Filed in Computers | 2 responses so far
Felt Guilty!
bgk on Apr 18th 2003
Today’s w3c validator tip was Hypertext Style: Cool URIs don’t change. I read through it and felt guilty because of the changes I made to the blog some while ago. I noticed some time ago Google bot had indexed about 20 of my articles with the old style URL and continued to crawl them.
Deciding to be a good netizen I wrote some rewrite rules for Apache and sent a 301 for all of the pages Google has indexed. I hope it works! I also turned on MultiViews for my new domain.
Filed in Computers | No responses yet
Engineering, Science, Art.
bgk on Apr 17th 2003
I’m not sure what to make of Erik’s thoughts in NSLog(); - Software Engineers. Software is about engineering, at least it should be. Engineers strive to create and achieve amazing feats in their field. To do this they apply certain principles and techniques and where necessary redefine them.
A good engineer won’t stick to doing using the same methods, simply because standards dictate that is the way they should be done. I wonder if Erik has read The Fountainhead? Just because Howard Roark is an architect, doesn’t mean he does what most mediocre architects do and copy the work of the great masters!
Writing good software is scientific act — given a problem and some tools, construct a solution to the problem. Yes, ingenuity and creativity are required, in the same way that Newton needed them when he wrote Principia; in the same way that the guy who built that first bridge needed them. It’s these elements that make programming fun.
Taking a slightly different point of view: If we take engineer to mean ’someone who applies principles and techniques to solve problems’ then the majority of software I see these days comes from engineers. Writing in an environment like Cocoa, .NET or Java, where there are rich “frameworks” to make the programmers life easier is akin to engineers being able to refer to text books on how to solve certain problems. “What gauge steel should i use to span this bridge”.
So taking this view, “software developers” are just tool users; they don’t even need to be creative — software development is all about using lego(s)! In the same way the civil engineering is about seeing how things were done before and copying the ideas.
I suppose the points I am trying to make here are:
- All the terms (engineer, coder, etc.) are valid, but to me they are all different things. People at the cutting edge of research are scientists (and hackers?), people plugging together APIs are engineers or coders.
- Engineering doesn’t necessarily imply “red tape” but red tape isn’t necessarily a bad thing either. Take parsing for example, parsing has been totally understood for decades and if someone is going to write a parser then they ought to adhere to the standards (i.e. write a parser that works).
- The “art” that Erik speaks about, is creativity and ingenuity, and this is something the best scientists have
Filed in Computers | One response so far
New Toy
bgk on Apr 4th 2003
Hmm, I’ve used this title for an entry before, I wonder if I buy too many toys (if that’s possible). Anyway, I bought myself a Canon Digital Ixus 400 today. It’s a great tiny digital camera and I’ll be taking lots of photos I hope.
I went out for a walk to Beeston Canal and took some pictures. There wasn’t really much worth taking, but I think the lock keeper’s house came out ok! Tomorrow, if the weather is nice I’ll take a drive somewhere more interesting!
iPhoto is a fairly decent tool for managing the photo collection, I’ve got this nasty feeling I’ll end up running out of disk space real soon !
Not needing a USB card reader makes life nice too, I wonder if IEE 1394 or USB2 will make it on to cameras any time soon!?
I’m very impressed with the camera so far, the pictures are really great! Even the digital zoom is passable (once the pictures are reduced).
Filed in Computers | No responses yet
Report Writing …
bgk on Mar 15th 2003
This weekend I have to write reports for my students onto a pre-formatted A4 page. So I decided I would try to print them (rather than hand write), after all these are going home to parents
I thought about mail-merging in word, but it wasn’t flexible enough and so I built a copy of pdflib and using the XML::Simple perl module I constructed a simple little tool that will do the job! It’s ~20lines long, I guess I still have a lot to learn about perl :). Now all that remains is for me to actually WRITE the report text as an XML document and viola!
Filed in Computers | No responses yet
djbdns
bgk on Mar 14th 2003
This morning I finally got around to migrating my DNS systems to djbdns. Mr Bernstein is a smart guy and I like the apparent simplicity of all of the djb tools. The migration procedure is documented fairly well.
The idea of keeping the cache and the DNS server apart makes a lot of sense and I’ll remove reliance on named-xfer soon when I find some time to change to upgrade my secondary machine. I can also allow my hostees to change their own DNS entries now thanks to the “machine friendly” data file format!
So - everyone .. replace your BIND installs with DJB ! ![]()
Filed in Computers | No responses yet
Good Advice …
bgk on Mar 14th 2003
In his NSLog(); Erik gives some great advice for people starting out with MovableType. I wish I had found his site a few weeks earlier.
I’ve made a few changes to the system now, categories are now displayed and there is a archive by category in the menu. I’ve added some additional categories and we’ll see how things go.
Additionally I’ve fixed up some of the formatting of the archive pages (that’ll teach me to mess around with the default templates so much!) and made sure it looks OK in IE / Chimera and of course Safari! Seems IE doesn’t deal with margins and floats very well.
Filed in Computers | 3 responses so far
Update on that CSS thing ..
bgk on Mar 10th 2003
In fact it’s nothing to do with the HTML comment, rather it’s the exclamation (or ping a.k.a. !). A construct like this .stopsafari { color: green; ! } seems to stop the CSS parser dead in it’s tracks :-(.
See an example without it … and one with it …
Filed in Computers | One response so far
CSS Parser problem?
bgk on Mar 9th 2003
Hello Folks,nice site youre running!
Filed in Computers | No responses yet
Cocoa / ObjC progress
bgk on Mar 2nd 2003
Well I’ve made some nice progress in ObjectiveC today. I decided to start with something simple; a “CSS Hex” <--> RGB convertor. I figured it would be a challenging problem, some simple parsing and interfacing with Cocoa UI elements.
Next weekend maybe I’ll be working on something a little more substantial!
Filed in Computers | No responses yet
Objective C
bgk on Mar 2nd 2003
How do I return an object reference ?
+(BOOL) Foo:(NSObject *c) {
NSObject *foo = [[NSObject alloc] init]
c = foo;
return YES:
}
Why doesn’t this work? ![]()
[edit]
Well now I know
+(BOOL) Foo:(NSObject **c) {
*c = [[NSObject alloc] init];
return YES:
}
I always forget multiple indirection .. ![]()
Filed in Computers | No responses yet
Safari text-decoration?
bgk on Feb 28th 2003
I was playing around with some CSS to allow me to use an image in the banner of my main page. When i checked it out in a “hypothetical” Safari build I noticed the CSS logo had some text-decoration that wasn’t there before!
It seems that if there is any white-space space between the anchor and the img you get the text-decoration. So that’s what you’ve fixed right Mr Hyatt?
Filed in Computers | No responses yet
End of an era ..
bgk on Feb 15th 2003
Those of you who know me, will be aware that I often rant on about a game called Everquest (EQ). EQ has been part of my routine (life?) for nearly 3 years now, I’ve spent over 150days (yes … 150 x 24 hours) playing it.
The past few weeks I’ve been thinking about giving it up. The biggest problem being what would I do instead? Well I decided today to cancel my accounts and give notice to my guild that I will no longer be around. I feel now that I’ve “finished” the game, nothing I else I can do will give me any additional satisfaction.
So what will I do? Well I got my bike out of the garage for the first time in 5 months today and went for a ride … I guess there is lots more stuff that I used to do .. that I can still do.
In the short term, on the entertainment side, I guess I can try out some of the other games out there, Unreal2, Age of Mythology, C&C generals. However ultimately I’d like to find something as challenging and entertaining as EQ was. I think I may have to wait for Brad to announce what he is working on.
As for current/coming soon MMOGs, SWG looks interesting, I’ll certainly give it a try. AC2 lacks content (but has potential … ). DAoC .. not really sure, didn’t like it when I tried it before.
Well, Fairwell Norrath.
Filed in Everquest | 2 responses so far