Welcome to the Boolean blog

Here you will find details of news, projects, releases and other bits and pieces that we are working on at Boolean. We hope that you find something of interest amongst the archives.

Code snippets, methodologies and useful links will also be mentioned here.

Where there is more to logic than TRUE or FALSE

Archive for 'Twitter'

OSX Lion 10.7.2 Tweetdeck Crashes

Tweetdeck has been crashing on startup recently, – seemingly without any kind of pattern. At first I attributed this to OSX Lion related issues, but sometimes having Firefox or Chrome open seemed to solve the problem.

I have finally tracked down the underlying issue to Adobe Air, the framework powering Tweetdeck and many other applications. In fact it is the switching software for late model Macbook Pros toggling between the discrete and integrated graphics cards. Launching Firefox or Chrome forces the graphics card to switch to discrete mode, solving the autoswitching and crashing on startup error.

You can manually change the setting to solve the problem by navigating to System Preferences -> Energy Saver. Uncheck the Automatic Graphics Switching at the top of the preferences dialog.

A better fix however is to use gfxCardStatus which is a menu bar application for OSX that allows users of dual-GPU 15″ and 17″ MacBook Pros to view which GPU is in use at a glance, and switch between them on-demand.

Update 29/01/2012
I have discovered that VMWareFusion does not play nicely at all with gfxCardStatus. Fusion will work if you disable dynamic switching and force the use of the discrete GPU but if you change between the two, expect major issues. I’m disabling gfxCardStatus before launching Fusion to avoid the problems.

PHP URL Shortening

A current Twitter related project involves quite a few URLs and because Twitter limits you to only 140 characters per post shortening a link can be very rewarding.

There are a multitude of URL shortening services on the internet and whilst perhaps not producing the shortest links, TinyURL.com requires no account in order to use it via PHP which makes for a very simple query:
function getTinyUrl($url) {
return file_get_contents(“http://tinyurl.com/api-create.php?url=”.$url);
}


bit.ly is another popular URL shortener, however it does require an easily obtainable API key. The code is below:
function getBitly($url) {
$query = file_get_contents(“http://api.bit.ly/v3/shorten?login=YOUR_LOGIN&;apiKey=YOUR_APIKEY&longUrl=”.$url.”&format=xml”);
$element = new SimpleXmlElement($query);
$bitlyurl = $element->data->url;
if($bitlyurl){
return $bitlyurl;
} else {
return ’0′;
}
}

Dont forget to change YOUR_LOGIN and YOUR_APIKEY to your own values. I’m sure you dont need any help with usage, but as always comment if you have any issues.

New Twitter Application started

It has been quiet on the development front recently, however a new personal project is in the works.

Stay tuned for news, revelations, and beta invites!