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>

Thursday 3 January 2013

Firefox plugin: Markdown Editor

In my ongoing saga to assemble a method of storing personal notes in a way that best suits me, I stumbled across a Firefox plugin named Markdown Editor. As its name suggests, it is a Markdown editor which can be used to edit locally-stored text files in Markdown markup.

It provides a split-pane view, with one pane being the editing pane and the other an automatically-refreshed HTML view. The editor is quite basic with undo, save and save as features.

If you use Markdown markup but don't want to use a standalone application, try Markdown Editor. It makes a very useful addition to Firefox. It's quite basic in its functionality at the moment and could perhaps benefit from some enhancements and new features.

Try it and see for yourself. If you do try it, please write a review on its Mozilla Firefox plugins page as so far there it has had very few reviews.

Firefox's recent changes have impressed me

I am impressed by recent changes and changes in progress to Firefox, namely:

  • an optional PDF viewer written in Javascript;
  • a new Downloads dialog box, with a matching Navigation bar button to show/hide the dialog. I definitely prefer this to having an entirely separate window opened (available only in the Nightly build at the moment);
  • an option to open links in a Private Window. This is an improvement over the previous option, which was to switch the entire browser into Private Browsing mode (OK - I may have the name of that feature wrong) (available only in the Nightly build at the moment).
Yay Mozilla!

Note: I am well aware that these features have been available in Chrome for some time. I give Google credit for the excellent browser that is Chrome but my preference is for Firefox.