Tuesday, October 25, 2011

Review: Getting Things Done: The Art of Stress-Free Productivity

Getting Things Done: The Art of Stress-Free ProductivityGetting Things Done: The Art of Stress-Free Productivity by David Allen

My rating: 5 of 5 stars

I've been using the methods and techniques described in GTD along side mind mapping in practice for over 8 years (mostly due to tools like OneNote, Emacs ORG mode, XMind/Fremind, etc). Reading this book has definitely helped optimize my workflow and planning into something quite a bit more efficient.

Right now I'm still looking to overhaul my tooling, OneNote isn't available on UNIX-like system (though it mostly works with wine), and Emacs ORG mode isn't practical for pasting images, screenshots, video, audio, files, etc. and such for reference.

It's tried a bunch of Java tools (Thinking Rock and GTD Free) but they're not very good for reference, note taking and reminders / calendar stuff. So far it's proving hard to beat the OneNote + Outlook + Project combo.

One tool I've been using for a while now (probably an year or so) along side OneNote is Tracks . It's a RoR webapp that covers most things in the GTD workflow. Although import/export isn't yet available as of version 2.0, it gets the job done. It's also available from Bitnami as a pre-installed stack.

If you're into GTD or just like to organize yourself with TODOS, tasks, projects and such, Tracks is worth a try.

View all my reviews

Thursday, May 26, 2011

Convert AWK to Perl using a2p

Automatic conversion of AWK scripts to perl.

A little awk script that numbers lines:
ls -la /usr | ./linum.pl
1 : total 240
2 : drwxr-xr-x+ 12 root root 4096 2010-06-21 06:47 .
3 : drwxr-xr-x 22 root root 4096 2011-05-11 12:06 ..
4 : drwxr-xr-x+ 2 root root 69632 2011-05-24 14:07 bin
5 : drwxr-xr-x+ 2 root root 4096 2010-05-05 11:33 games
6 : drwxr-xr-x+ 5 root root 4096 2010-06-21 06:47 i586-suse-linux
7 : drwxr-xr-x+ 52 root root 4096 2011-05-13 04:17 include
8 : drwxr-xr-x+ 156 root root 69632 2011-05-24 14:07 lib
9 : drwxr-xr-x+ 10 root root 4096 2010-06-21 06:47 local
10 : drwxr-xr-x+ 2 root root 12288 2011-05-24 14:07 sbin
11 : drwxr-xr-x+ 213 root root 4096 2011-05-23 13:19 share
Let's convert this to perl using a2p.
echo '{ printf("%5d : %s\n", NR, $0) }' | a2p > linum.pl
chmod +x linum.pl
Let's try it out:
ls -la /usr | ./linum.pl
1 : total 240
2 : drwxr-xr-x+ 12 root root 4096 2010-06-21 06:47 .
3 : drwxr-xr-x 22 root root 4096 2011-05-11 12:06 ..
4 : drwxr-xr-x+ 2 root root 69632 2011-05-24 14:07 bin
5 : drwxr-xr-x+ 2 root root 4096 2010-05-05 11:33 games
6 : drwxr-xr-x+ 5 root root 4096 2010-06-21 06:47 i586-suse-linux
7 : drwxr-xr-x+ 52 root root 4096 2011-05-13 04:17 include
8 : drwxr-xr-x+ 156 root root 69632 2011-05-24 14:07 lib
9 : drwxr-xr-x+ 10 root root 4096 2010-06-21 06:47 local
10 : drwxr-xr-x+ 2 root root 12288 2011-05-24 14:07 sbin
11 : drwxr-xr-x+ 213 root root 4096 2011-05-23 13:19 share


The code block looks pretty good:

while (<>) {
chomp; # strip record separator
printf "%5d : %s\n", $., $_;
}

NSA Operating Systems Security Configuration Guides

NSA published some rather interesting OS security guides:
http://www.nsa.gov/ia/guidance/security_configuration_guides/operating_systems.shtml

The RHEL Security Guides are quite good.

I've used these along with the Security Guide and the Security-Enhanced Linux guides from RHEL.

Friday, May 20, 2011

IBM SmartCloud Enterprise tips: LVM and FTPS

IBM SmartCloud Enterprise tips:

Learn how to set up a 64-bit Linux® instance (starting with a Bronze-level offering) with the Linux Logical Volume Manager (LVM), capture a private image and deploy a new instance as a different offering (a Platinum tier) and then grow the LVM volumes and file systems to accommodate the new physical volumes. This article also shows how to configure and manage LVM across physical volumes using Linux LVM-type partitions:


Set up a Microsoft® Windows™ Server 2008 R2 on the IBM Cloud so that it can act as a file server. This article details the steps to configure an FTPS and SMB file server using persistent storage; this enables the cloud user to upload and download files to and from instances in the cloud and facilitate data exchange:

Sunday, October 10, 2010

Microsoft Mathematics Add-In for Word and OneNote

Heh, this one is pretty awesome. Calculus and plotting in Microsoft Word :-). Best of all, it's a free add-on.



And while we're on the subject of educational software:

You can even grab the source code for this: http://chem4word.codeplex.com/

Saturday, October 02, 2010

Mount hfsplus and hfs read write on Linux

Mount HFS+ rw on Linux (at your own risk...)

# Install HFS+ support
aptitude install hfsplus hfsprogs hfsutils
# Keep an eye on your dmesg:
tail -f /var/log/messages
# Get an idea on what partition you'd want to mount
cat /proc/partitions
# See what filesystems are supported
cat /proc/filesystems
# Check for a hfsplus LKM
modprobe -l | grep hfsplus
# Load it
modprobe hfsplus
# Check to see if it's loaded
grep hfsplus /proc/partitions
# Mount the HFS+ partition. If it's journaled, we don't need -o force.
mount -t hfsplus -o force -o rw /dev/sda2 /mnt/test
# Verify it
/dev/sda2 on /mnt/test type hfsplus (rw,force) touch /mnt/test/selftest ls -la /mnt/test/selftest
# If we're not allowed to mount with the write option, check dmesg
# If required, fsck, then remount.
/sbin/fsck.hfsplus -f /dev/sda2
# As an alternative, you can disable the journal on a MacOS:
# GUI: hold option while clicking the menu in Disk Utility. CMD:
diskutil list
sudo diskutil disableJournal /Volumes/Yourdisk

Tuesday, August 24, 2010

ClusterSSH alternative, broadcasting to multiple terminals

Gnome "Terminator" is basically similar to ClusterSSH, dsh, kanif or such but runs all terminals in a single window you can split and such somewhat similar to screen.

It's also a bit more configurable (eg: gnome-terminal).



http://freshmeat.net/projects/gnometerminator/?branch_id=70626&release_id=268543

Friday, August 13, 2010

ThinkPad fingerprint scanner - Linux PAM setup

Using fingerprint scanners for login is cool. Sure, it's insecure, but who cares about that :-). It's awesome!

Do enroll more than one finger, and have a fallback mechanism though...

# Install fingerprint software.
# You can play around with fprint_demo to try it out...
sudo aptitude install fprint-demo libpam-fprint libfprint

# Enroll the index finder. See pam_fprint_enroll --help for details
pam_fprint_enroll --enroll-finger 7

# Edit your PAM configuration to enable fingerprint login
# Fallback to password if it fails.

# emacs /etc/pam.d/commond-auth
# Add something like:

# Fingerprint
auth sufficient pam_fprint.so

You could also require both, but that's just awkward :-). And if finger print scanning breaks, it's a PITA.

Monday, July 26, 2010

Emacs: Different fonts in different modes


I love monospaced fonts (such as Terminus or Consolas / Inconsolata), but they can be harder to read when it comes to documentation or simple conversation.


So, let's make Emacs use different fonts (monospaced and variable) depending on the mode we're in (eg: Info and ERC should not be monospaced), and let's add some shortcuts to change font type /size easily. You can do something like this with a bit of elisp in your init.el / .emacs.


;; Insidious Black Magic Bits:

;; Use variable width font faces in current buffer
(defun my-buffer-face-mode-variable ()
"Set font to a variable width (proportional) fonts in current buffer"
(interactive)
(setq buffer-face-mode-face '(:family "DejaVu Sans" :height 100 :width semi-condensed))
(buffer-face-mode))

;; Use monospaced font faces in current buffer
(defun my-buffer-face-mode-fixed ()
"Sets a fixed width (monospace) font in current buffer"
(interactive)
(setq buffer-face-mode-face '(:family "Consolas" :height 100))
(buffer-face-mode))

;; Set default font faces for Info and ERC modes
(add-hook 'erc-mode-hook 'my-buffer-face-mode-variable)
(add-hook 'Info-mode-hook 'my-buffer-face-mode-variable)

;; Control + scroll to change font type
(global-set-key [C-mouse-4] 'my-buffer-face-mode-fixed)
(global-set-key [C-mouse-5] 'my-buffer-face-mode-variable)

;; Shift + scroll to change font size
(global-set-key [S-mouse-4] 'text-scale-increase)
(global-set-key [S-mouse-5] 'text-scale-decrease)


And the results:

Note that you can also Shift + Left Click on a window to set fonts / font sizes.

Sunday, July 18, 2010

Converting Perforce depots to Mercurial repositories with hg convert

Converting Perforce to Mercurial repositories is fast (4-5 seconds for a 500MB repository with 300 revisions).

You'll also want to start p4d and log into P4V before, so it caches credentials.

1. Setup your p4 client:
export P4PORT=localhost:1666
export P4CLIENT=your_client_here

2. Enable hg converter by adding to ~/.hgrc
[extensions]
hgext.convert=

3. Start p4d
./p4d &

4. Convert the depot:
You need to specify a revision. Look it up in the p4 client (depot-details-revision). @all might also work.
hg convert //depot/...@307 converted-perforce path/to/hg-repo

5. Look at the history
hg history

6. Look at diffs and history with a graphical tool. This should give you a better idea of branches and such.
hgview

7. Clone your repository
hg clone /path/to/hg-repo

8. Publish your repository via the web interface
hg serve

9. Browse around
http://localhost:8000/


Additional notes:
Keep an eye on: