Labels

programming (8) rails (7) tools (7) cluj (4) productivity (4) emberjs (3) misc (3) startups (3) internet (2) software (2) architecture (1) hack (1) java (1) meetup (1) os x (1) science (1)
Showing posts with label tools. Show all posts
Showing posts with label tools. Show all posts

Tuesday, November 10, 2015

Less cat tail, more less! (Why I stopped using the UNIX cat)

I've been using cat for ages to display contents of files. I used it very rarely to actually concatenate files together.



And I've been using tail -f to follow logs, since I started doing web development. I always had the problem that I wanted to scroll back but, as new items were added, it would automatically scroll me back to the end of the file.

At one point I stumbled upon a good alternative, namely using less +F. I loved that you can switch between examine (^C) and follow mode (⇧F).

I was still using cat until the final blow came and revealed that cat interprets escaped sequences. If you've been doing any kind of programming, you know how that can turn bad.

Tuesday, September 8, 2015

Get your Amazon WishList with a UNIX one liner

I was trying to export my entire Amazon WishList. Which is actually my reading list. The web version displays only 10 entries per page, and they deprecated their API endpoint for retrieving wish lists. Other solutions that I found online seemed clunky so I set out to find the simplest way of doing it.

Friday, July 27, 2012

sed replace inside quotes



Here's a useful sed one-liner:

echo "printf(\"foo\");" > quotemeonthat
sed -i.bak 's/printf("\(.*\)")/printf("\1 is just too lonely without bar")/' quotemeonthat
cat quotemeonthat 

-i.bak - edits the file, preserving the original in quotemeonthat.bak
\1 - refers to the first matched group

output:
printf("foo is just too lonely without bar");

Suggestions for improvements are always welcome :)

Thursday, July 5, 2012

How Google is forcing Chrome on me


iGoogle will be retired in 16 months, on November 1, 2013. The mobile version will be retired on July 31, 2012.
 [...]
If you’re a fan of Google Chrome, the Chrome Web Store provides a similar range of options like productivity tools and applications to check the weather. In addition, just like iGoogle, you can personalize Chrome with a theme.
 *sigh*

What's your daily amount of Google?

EDIT: Using NetVibes as alternative to iGoogle. I'm very pleased.

Friday, June 22, 2012

6 mistakes I was making that were killing my productivity and my focus

1. Grinding the tabs

The problem: opening 34 new links as soon as you start working and start grinding through them.

The fix: Stay mindful. Do one thing at a time: see a link, open it, read it immediately, close it.

Not staying in control of my browsing activity. I use iGoogle to keep everything in one place (feeds, to do, bookmarks, email, weather). I also use Instapaper (with a sweet RSS feed to my iGoogle) to and Gimmebar (this is great for when you just want to quickly save snippets of text instead of bookmarking and tagging entire pages).

Coming back to iGoogle, naturally when I'm going through that huge list of headlines I would open everything that looked interesting in a new tab (if you've browsed Wikipedia, you've been there too, not surprisingly it's called the Wikipedia effect); wanting to go through everything and know everything about a certain subject.

If your mind is wandering, jumping one thought to the other and you can't seem to compose it to actually get something figured out, when you start surfing, it will lead you to "grinding the tabs".

2. Perfectionism

The problem: Getting lost in the details.

The fix:

Do not wait; the time will never be just right. Start where you stand, and work with whatever tools you may have at your command, and better tools will be found as you go along."

Hill, Napoleon


Thursday, June 21, 2012

A faster and more fun way of drawing diagrams

If you're like me, you don't like dragging and dropping items to make UML diagrams. On the other hand, although I'm a complete anti-talent at drawing, I find it helpful to sketch and map out things. I always take hand written notes even if it would be more comfortable simply to type things in a text editor of choice. I like to repeat in my head and visualize the sentences I'm tackling. Things seem to settle down better. Coming back to the topic:

You can get to this:


Just by typing this:
Mind->Body: sleep(6.5h)
    alt onWakeup
        Body->Mind: setEyesFeeling(TIRED)
        Mind->Body: snooze(10m)
            loop rand(1,9) times
                Body->Clock: press(snooze)
        end
    end

Link: http://www.websequencediagrams.com/

What do you think?

Monday, March 12, 2012

How to install libXm on Fedora 16

error while loading shared libraries: libXm.so.3
To get the libXm library you need to get OpenMotif package, which is available from the RPMFusion repository.

Fire up a terminal:

sudo yum install wget
RPM Fusion provides software that the Fedora Project or Red Hat doesn't want to ship.
wget http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm 
wget http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
sudo rpm -if rpmfusion-free-release-stable.noarch.rpm rpmfusion-nonfree-release-stable.noarch.rpm
Motif is the industry standard toolkit for UNIX systems and Open Motif, based on the Motif source code, provides a freely available version for open source developers.
sudo yum install openmotif.x86_64

Now just link the package to where it should usually be found:

sudo ln -s /usr/lib64/openmotif/libXm.so.4 /lib64/libXm.so.3

P.S.: You can always use yum whatprovides *missing_library_name.so to see what package provides a missing library.