my favorite


nodejs powered

This post is shooting for nodejs-powered Mac users

It's pretty useful if we can shorten URL in command-line, especially we can have a helper to achieve below
1. ease to have/install
2. ease to use

for installation
npm-g install

we still need do some modification since output key -> value, that say if you do shorten you will see ->

edit /usr/local/bin/ (check installation path)
change line 135 from
console.log('%s -> %s', val, ( || JSON.stringify(res)));
console.log('%s', ( || JSON.stringify(res)));

added a bash helper in ~/.profile

function gg() { $1 | pbcopy

source ~/.profile

now you can simply type
gg and get shorten url in clipboard

1 comment:

Blogger said...

Did you know that you can create short urls with AdFly and get $$$$$ from every click on your short links.


Taipei, GuTing, Taiwan

huang47 | personal

huang47 | personal