Wednesday, 19 February 2014

Doit.im

Note to self: Doit.im is a web-based todo-management site which has a great set of features for free, looks great, and has a matching Android app. http://doit.im/

Tuesday, 21 January 2014

Firefox Nightly/Beta/Aurora - Sharing plugins with a standard Firefox release on Linux

To share the plugins of an existing, standard Firefox installation on Linux, create a symlink in the directory ~/.mozilla. 1. Open a terminal emulator and navigate to ~/.mozilla. If this directory doesn't exist, create it with the command "mkdir .mozilla". 2. Create a symlink to the 'plugins' directory of the existing Firefox installation with the command "ln -s /usr/lib64/mozilla/plugins/ plugins" 3. Start Firefox Nightly/Beta/Aurora and open the 'Plugins' page. If this procedure has been successful you will see the same list of plugins as in the existing Firefox installation. The example symlink command assumes you're using a 64-bit Linux distribution. If not, exclude the "64" from the command. If the 'plugins' directory is in a different directory to this example, modify the path in the example symlink command.

Wednesday, 2 October 2013

ROXTerm: a good-looking, fully functional terminal application for Linux

Since the GNOME developers recently dropped transparency from the native terminal emulator application, you might be looking for an alternative. There are many available, but I would recommend you consider ROXTerm [1]. It's effectively a drop-in replacement for the GNOME Terminal application. Its features include: drag-and-drop support for files, a tabbed interface, the ability to drag tabs outside the main window to create separate windows, and extensive configuration options. [1] ROXTerm home page: http://roxterm.sourceforge.net/

SOLVED: Writing a hybrid ISO image to a USB stick/key/thumb drive on OSX is very slow

Being new to OSX and my iMac, I couldn't understand why writing an ISO image to a USB thumb drive was very slow, sometimes taking around 2 hours. Having done the same under Linux I *knew* it wasn't supposed to take that long. Finally I searched for and found the solution in a superuser entry [1], I found a solution: prefix the device name with "r". I also learned that the block size parameter must be specified in lower case on OSX: "bs=1M" instead of "bs=1M" under Linux. WARNING: The device parameters I have used in the following examples may not match the device parameters required in your configuration. *DO NOT* simply copy-and-paste these commands. For example, the following is a command I might use under Linux:
dd if=filename.iso of=/dev/sdb bs=1M
The equivalent command on OSX would be:
dd if=filename.iso of=/dev/rdisk1 bs=1m
Note the "r" in the output device's name, also that the "m" is in lower case. [1] http://superuser.com/questions/421770/dd-performance-on-mac-os-x-vs-linux

Sunday, 14 April 2013

Built-in text editor is available in Firefox

Firefox offers a handy built-in Javascript editor named 'Scratchpad' which can act as a basic text editor. It's great for small text editing needs, including your TODO list, or perhaps making quick notes about something you just read about. Multiple instances of Scratchpad can be open at once, and they are seen by a window manager as seperate windows. Scratchpad's features include: * Keyboard shortcuts; * 'Recent files' menu; * Basic editing, including undo, redo, find, and jump (to a specific line number). There is no search-and-replace function because it's outside Scratchpad's design scope. Next time you need to do some basic editing, try Scratchpad instead of your usual editor.

Tuesday, 5 February 2013

grin - an alternative to grep

I sometimes have difficulty getting grep to do what I want it to do. Today I wanted to search all files in a directory and sub-directories for instances of a string. After having difficulty with grep, I went looking for a tool named 'ack' which was written in Perl and intended as a replacement for grep. This search somehow led me to the home page of a smilar tool written in Python. The tool is named 'grin' and can be found at http://pypi.python.org/pypi/grin.

grin was easy to install and very easy to use. I particularly found it useful to have the 'hits' highlighted.

Perhaps I could have done this all with grep but grin has done exactly what I wanted it to do, so I think I will continue using it. Those who disagree with just have to grin and bear it. Bah boom, tish! :D

One-line text editor in your web browser

A colleague of mine gave me a tip for a basic, in-browser text editor. In a modern browser, enter the following in the address bar:

data:text/html, <html contenteditable>

At first it seems that nothing's happened. The browser pane is one large text entry field. It's a great way of being able to quickly copy snippets of text from a web page, or keep temporary notes. You can even bookmark the address so that you can quickly have a scratchpad available.

When I first saw this I was amazed! OK, maybe I'm easily impressed. :) I wanted to share it, so asked if I could mention it on G+. My colleague suggested that instead I link to the original page. When I searched for this, I had many hits returned, with the first being a blog post titled "One line browser notepad". The blog post's author described the method I mentioned above. I then went on to read some of the comments made in reply to the post and was amazed to see that there were at least 10 further enhancements and improvements suggested. I highly recommending you visit this blog post and try some of the methods.
For my purposes I settled on the example below. It goes a few steps further than the basic example, giving the tab a title, adding a [Save] button, increasing the text size, adding a favicon and setting the focus on the editing pane. One advantage of this solution over other solutions suggested is the ability to save the contents of the text box. It's not a fully-blown editor but you can at least save your notes if you want to do that. All credit for the code below goes to those who commented to the blog entry. It is entirely the result of cut-and-paste-ing some of their contributions.
data:text/html;charset=utf-8,<link%20rel="shortcut%20icon"%20href="http://g.etfv.co/http://www.sublimetext.com"/><title>Scratchpad</title><button%20onClick="SaveTextArea()">Save</button>%20<script%20language="javascript"%20type="text/javascript">%20function%20SaveTextArea()%20{%20window.location%20=%20"data:application/octet-stream,"%20+%20escape(txtBody.value);%20}%20</script>%20<textarea%20id="txtBody"%20style="font-size:%201.5em;%20width:%20100%;%20height:%20100%;%20border:%20none;%20outline:%20none"%20autofocus>%20</textarea>