Skip to main content
 

iPhone Home Screen

iPhone Home Screen July 2011It's always fun to discover new apps, and a good way to see which apps are used most is to look at the first home screen. So here's mine, where is yours?

The apps you can see are (apart from the built in Apple ones):

  1. Captio - Send yourself a quick note with just one tap.
  2. Simplenote - An easy way  to keep notes, lists, ideas, and more.
  3. Action Lists - Getting Things Done made easy.
  4. moneyStrands - Personal finance software.
  5. UK & ROI - navFree navigation software.
  6. http://wfco.de/iphone/ShoppingList">ShoppingList - The shopping tool for your iPhone or iPod touch.
  7. Dropbox - Bring your photos, docs, and videos anywhere and share them easily.
  8. Due - The missing reminder app fit for your homescreen (multiple alarms)
  9. http://vemedio.com:80/products/instacast">Instacast - Instant access to podcast subscriptions, stream or download episodes wirelessly, follow show notes and enjoy audio and video podcasts on-the-go.
  10. Tiny Tower - Tower people management game

 

Ubisoft "extremely limited" by PS3, 360

We think that the next generation of consoles won't have these limits any more. Games might have more realistic graphics and more on-screen, but what's the value of making something more realistic and better animated if you have poor AI?

via Ubisoft "extremely limited" by PS3, 360 News - - Page 1 | Eurogamer.net.

They might think they want better AI, but once the Xbox 4 and PS4 are out they will be back competing on graphics and violence.

 

Using mysqldump to generate database backups

When administrating a database server, you will definitely have to put a backup solution into place. I normally run mysqldump on the database and save it to a file. However when the database server has several dozens or more databases, setting up a process for each instance quickly becomes unwieldy.

Instead, I wrote a batch file to automatically create SQL backups by quering all databases. Simply set up a scheduled task to run it at the desired interval.

Contents of dumper.bat:

[sourcecode language="plain"]
@echo off
mkdir dumps
mysql -N < list_dbs.sql > dbs_list.txt
for /F "tokens=*" %%A in (dbs_list.txt) do ping localhost -n 2 > nul & echo dumping %%A & mysqldump --add-drop-database --database %%A > dumps\%%A.sql
[/sourcecode]

Contents of list_dbs.sql:

[sourcecode language="sql"]
SHOW DATABASES;
[/sourcecode]

I have noticed that the database server becomes quite highly utilized even with the the pause between dumping each database, so as with all solutions please test it in your environment first before implementing if this is an issue for you.

 

A Blank Favicon

Sometimes you just need a favicon to stifle angry apache logs.

via http://blankfavicon.com:80/">A Blank Favicon.

 

Reminder Bear

You know how every now and then you want to revisit a page in a while to see what's changed? Perhaps review if something has been added to a discussion? Maybe you're waiting for a beta to open or you have posted to a forum that doesn't have topic notification (or it is a regular website).

Simply click the reminder bear bookmark and customize when you want to get an email reminding you off the page. It's like a disposable bookmark, and lets you get on with more important things. I find it very liberating, try it out yourself.

 

 

Replace all copies of a file under Linux

Today, after making a change to a php file, I had to update all copies of this file with the changes. The following command will update all files with the same name. Note that this will only work as expected if the name is unique. A theoretically better way to do it would be to find all files with a certain hash.

Anyways, here's the linux shell command. First copy the updated file into the current directory (/tmp for example):

find /target_path/ -iname "some_file.php" -exec cp new_file.php '{}' \;

 

Smart Podcast Playlist

Create a smart playlist with all unplayed podcasts. By using this playlist you no longer have to find the next podcast on your iPhone whilst driving back home. Make sure that you include the smart playlist on the Podcast tab of your iPhone, iPad or iPod Touch.

Update:
Although this seemed a great solution in theory, there are some issues with this approach in practice. As diskspace on the iPhone is at a premium you will have to limit the amount of podcast data stored on your device. However, because there is not an option to keep 1 unplayed episode per podcast in the smart playlist editor you have to set the amount of diskspace used. When you have several podcasts and some are updated more frequently then others you will end up for some podcasts not being on your device and others that are continuously listened to. Therefore I opted for http://vemedio.com:80/products/instacast">InstaCast which caches 1 episode per podcast and comes with continuous playback in its latest update.

 

Bard 0.3.0.3 Released

Updated again (version 0.3.0.3) - I have fixed all known bugs.

Changes since 0.3.0.0:

  • instructions updated
  • Fixed problems remembering what directory we're working on.
  • Fix: now lists samples with mixed case or uppercase extensions
  • Removed tray icon
  • Menu item to AudioLibraryFolders now works correctly
  • Resizing now works as expected
  • Remember windows position and size between sessions

Download the latest version

 

Bard 0.3 Released

Bard uses move/copy operations to quickly organise your audio files into favourite folders. You can specify an 'unlimited' amount of folders which can all be used to sort audio to with one click. Other basic file operations such as renaming, deletion of audio is also supported.

In the resources folder you will find a small utility to create a basic audio library structure for you.

Changes:

0.3:
*  Added Prefix option to prefix selected files with name of a samplepack for example.
*  misc fixes
*  Enable .aiff samples
*  rewrote buttonmatching code - fixes bug where folders starting with spaces are no longer created
*  Better error checking on files that have been removed, deleted or renamed outwith the program.
*  Fixed hotkeys which got broken
*  Shift click a destination button to open the location in explorer!
*  Updated readme.txt and added tips.txt which are shown randomly in the statusbar
*  Right click rename file(s)

Download the latest version

 

Hide Trackbacks - Hide ping- and trackbacks from your comments

Introducing Hide Trackbacks - You can have the benefits of track/ping backs (know when someone writes about posts) whilst keeping the comments clean and uncluttered.

After enabling the plugin, trackbacks and pingbacks are no longer shown on your posts and the comment count is updated correctly to reflect this. You can still access them via the admin panel. NOTE: Although the plugin officially requires WordPress 3.1.2 it might very well work on older WordPress versions (if it does please let me know).
Derived from original code created by  Honey Singh (used with permission of the author).

Installation is simple:

  1. Upload the `hide-trackbacks` directory to `/wp-content/plugins/`.
  2. Activate the plugin through the 'Plugins' menu in WordPress.

Download link and information:
Wordpress.org Hide Trackbacks

 

Serve.sh updated for terminal use

After publishing the previous article about serve.sh - the shell script I created to easily serve websites in development - I made some changes to make it easier to run it from the terminal, for example over ssh. I thought I'd share it with you.

One of the problems with the original script was that it was optimized for a GUI setting - ie. start the script by clicking on it from the desktop. However usually I want to run it from the terminal. I don't like typing so I added code to make the script available from any directory to the ~/.bashrc:

export PATH=$PATH:~/bin

Then moved it to that path and renamed it to shave another 3 characters off the syntax:

mv ~/Desktop/serve.sh ~/bin/serve

In addition I noticed that prompting which site should be served was just a workaround for commandline arguments, which are now added. It doesn't check that you entered an argument though. So the new script now requires you to specify which directory you want to serve: to serve the current directory simply run:

serve .

Latest script contents:

#!/bin/bash
my_path=`readlink -f $1`
sudo rm /var/www
sudo ln -s $my_path /var/www
echo Now serving $my_path...

 

Serve.sh - A shell script for serving sites

I am experimenting with using a Linux virtual machine as my web development environment of choice. I store the vm on a removable drive so that I can develop from any location, without having to setup a working environment. Previously I had to check out the repositories, setup a local webserver and I had trouble keeping things working, because every configuration change had to be applied in every location. Now it is all centralized and my life is simpler.

The aim is to make working on projects as easy as possible. I have all projects checked out in a folder called /var/sites. They are mostly PHP projects and because of my shared hosting environment they share a single apache configuration. How can I easily serve them? Having seperate virtualhosts for each project would result in me having to make manual changes on every location again, so this was not the way to go.

Instead I created a simple shell script that creates a symbolic link from the Apache's webroot to the project I am working on:

[gallery link="file"]

#!/bin/bash
echo "Available sites:"
ls  /var/sites
echo
echo -n "Type site to serve: "
read site
if [ -z "$site" ]
then
exit
fi
sudo rm /var/www
sudo ln -s /var/sites/$site /var/www

 

[Patch] CodeIgniter Helper class patch for Textile

For those that do not follow me on twitter (@pacifika), I've created a patched version of Textile, the html generator alternative to Markdown, to make it easier to use in CodeIgniter projects. I have provided the patch and patched Textile on support forums of both projects.

[Patch] CodeIgniter Helper class patch for classTextile.php · Textpattern CMS Support Forum.

After patching, you can just use Textile like this:

$this->load->helper('textile');
$text = Textile("Dude this is *my* code!");

For more information read the post on the forums!

 

How To Search for Asterisk in Excel

A while ago I had to normalize values in an Excel sheet where some of the values contained an asterisk (*) and some did not. However it's not immediately clear how to search for a asterisk. It turns out the escape character is a tilde so searching for ~* is the correct way to do this.

[caption id="attachment_247" align="alignleft" width="300"]Searching for ~* to search for an asterisk in excel Searching for ~* to search for an asterisk in excel[/caption]

 

iTunes App Updates Sync

Wouldn't it be useful if iTunes would (have at least the option to) sync app updates to your device automatically after downloading them? How often I have forgot to sync and find out later in the day that my apps are still out of date.

 

Intranet Migration Strategy

Next week we're turning off our old intranet site so I have setup a "Migration Switch" and a redirection page so that from the moment we turn off the site people will not be able to access it. Because if we actually turn off the site we would receive phonecalls with people needing access to their lost data, and because certain parts of the old intranet are reused in our new one, we instead check if the page is embedded, and if it's not check that the user is on a whitelist of specifically allowed users (us). If this is not the case we redirect them.

Next week we will remove all navigation links to the old intranet, turn on the switch, and remove the documents from the search indexer on the (new) intranet. There must be better terminology for old and new intranet.

Hopefully this will ensure that everything works smoothly.

 

Create an Avatar Specific Communication Channel

Sometimes you will want to create a listener that will not interfere with any other avatar using the same object near you. The basic solution of detecting the owner creates a lot of overhead, therefore a better solution is to have individual channels.

Thanks to Winter Seale, on the SecondLife scripters mailing list:

use an avatar specific
channel. To do that I would define a function:

integer get_channel(key avatar, integer offset){
 return (integer)("0x"+llGetSubString((string)llGetOwnerKey(),-8,-1))
 + offset
 }

Then in your script, use:

 llSay( get_channel( llDetectedKey(number), -1234 ), (string)llDetectedKey(number) );
 ...
 llListen( get_channel( llGetOwner(), -1234 ), "", "", "");

* The reason this is better is that it keeps only one script (the
avatar's) listening on this channel. Without this, a script for every
person with a HUD would have to execute code every time your in world
object was touched.

 

Hear no iPad, see no iPad

What's the Deal With These Windows PC Guys Saying Stupid Things in Australia About the iPad?

Microsoft cannot get a tablet out so it's best to marginalise the whole market.

Via Daring Fireball.

 

A Conversation between Two Chat Bots

splotchy ==> You are a great conversationalist. One of the best I've seen.
jabberwacky ==> So are you. Especially since I can correct your statements to my liking.

via http://www.yiransheng.com:80/2010/03/bot">Yiran's MBA Experience|A Conversation between Two Chat Bots.

 

How I concentrate in a noisy office

We have seven people in a smallish office and typically two people discuss a problem by shouting across the room, while another person is busy making phone calls. As a developer it can be hard to concentrate on programming with all this noise around. That is until I discovered the Inception app.

From the http://inceptiontheapp.com:80/">official website:

Experience your life as a dream [..] This app is a dream machine that transforms the world around you into a dreamworld. It uses augmented sound to induce dreams through the headset of your iPhone and iPod Touch. It will change your perception of reality.

The idea of this app is that you listen to it while you do live your life, and in certain situations it unlocks interactive dreams, for example on a sunny day - or in a busy place. The still dream I'm listening to currently records audio through the microphone and playsback the samples through an echo with pitch-shift, resulting in an ever-changing soundtrack.

In my busy office with headphones on, this successfully creates an interactive soundtrack blocking all communications. I prefer it to a regular radio station and other solutions I've tried.

Update: Unfortunately this app no longer works with iOS 8. Recommendations are welcome!