kv can remember it for you, wholesale
secretGeek .:dot Nuts about dot Net:.
home .: about .: sign up .: sitemap .: secretGeek RSS

kv can remember it for you, wholesale

kv

I've started using a groovy little command-line utility found on the internet, and I have to say I am totally enamored of it.

It was brought to my nebulous attention by my conspirator Rhys, who has it in his 'util' folder of little tools, which I've hg cloned onto my own machine and en-pathed.

The tool in question is 'kv', which is short for 'KeyValue'. You can get it here:


kv.codeplex.com


Imagine you have a lot of ugly things to remember. I know you do.

For example you may need to remember (and frequently type out) the name of your 'dev' server, prod server, staging server, test server and so on.

Get kv to remember it for you!

At a prompt, type:

kv dev MaxServer0412_Tangerine

Now we've stored the rather cumbersome and hard to remember value 'MaxServer0412_Tangerine' against the nice little key name, 'dev'.

So when you type:

kv dev

Two things will happen: the value will get written out into the console. Okay, sure, whatever. But far better than that: the value will get put into your clipboard.

Rhys uses this to store his jargon file. He works in an industry with a lot of domain specific jargon. Every time he hears a new abbreviation that the business people expect him to know, he adds it to his kv stash.

Also - the values don't have to be simple things. They can be gigantic stuff, for example: the complete works of shakespeares. You can pipe a value, or an entire file into the kv command, just give it a key to use.

type 'completeWorks_of_shakespeare.txt' | kv shakes

If you want it to forget one its keys, use the -r switch:

kv -r shakes 

Provenance

The tool itself is based on 'boo' by stevenleeg which is itself based on boom by Zach Holman.

It's clearly better than both of those as it has an even shorter name. None of this three or four letter nonsense. Two letters. That's enough.

Here's the help it provides at the commandline:

>kv -?

kv -- a command-line key-value store integrated with the clipboard.
inspired by: https://github.com/stevenleeg/boo

usage:

kv name fred smith
saves the value, 'fred smith' under the key, 'name'

kv name
retrieve the value 'fred smith' straight to your clipboard.

kv
lists all keys

kv -r name
will remove the key 'name' (and its value) from your store

And two more tips, for super users:

1. You can also pipe a value in, e.g.

echo Hello Fred | kv Greeting
will store 'Hello Fred' under the key 'Greeting'
type File.xml | kv myFile
will store the content of 'File.xml' under the key 'myFile'

Even though, as I say, I found this after it was recommended by a friend, I have to admit that it's my own tool. I wrote it last year in an hour or so, as a simple demo of a little interface I was dabbling with at the time, called stashy. I immediately forgot about it until Rhys rediscovered it.

Utils Folders! Utils Folders! Utils Folders! Utils Folders!

Rhys's 'util' folder is a thing of joy. I think he should make it globally available so people everywhere can clone it, fork it and so on.

I even have a name for it: Rhys's Pieces. Clever hey, Rhys?

Got any little tools in your own utils folder?

Or any way you share your utils folder?



[Image above is of a KV Tank (Kliment Voroshilov), no relation.]





'George Mauer' on Sun, 21 Oct 2012 22:12:12 GMT, sez:

I've been using powershell pretty much exclusively as a combined launcher, file explorer, and utility everything. Powershell variables allow much the same thing (albeit with session-only persistence, but they can store full .Net objects).

As for my utils folder:
Directory: W:\tools


Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 5/4/2012 1:54 PM CoffeeSharp
d---- 5/2/2012 9:53 AM LINQPad4
d---- 5/2/2012 9:53 AM NHibernate-2.1.2.GA
d---- 8/19/2012 10:03 AM reflector
d---- 5/6/2012 7:44 PM SublimeLogger
d---- 5/2/2012 9:53 AM xunit-1.8
-a--- 8/6/2012 4:05 PM 143360 mongoose_aug12.exe
-a--- 4/17/2012 3:17 PM 567296 NuGet.exe
-a--- 3/24/2010 10:09 AM 72268 procexp.chm
-a--- 2/14/2012 12:10 PM 4777280 procexp.exe
-a--- 8/11/2011 9:38 PM 557056 smtp4dev.exe
-a--- 5/4/2012 10:46 AM 77 sublime_text.bat
-a--- 8/11/2012 10:58 AM 365 sudo.ps1



'steve andrews' on Mon, 22 Oct 2012 11:31:55 GMT, sez:

It would be nice to allow for changing the target location of files. One could use dropbox



'lb' on Mon, 22 Oct 2012 11:49:35 GMT, sez:

@steve

nice idea -- but my assumption was that you'd get that behaviour by using symbolic links.

Here's a LifeHacker article on how it's done:

http://lifehacker.com/5154698/sync-files-and-folders-outside-your-my-dropbox-folder




'Bojan' on Mon, 22 Oct 2012 12:23:38 GMT, sez:

Cool stuff...
Needs a linux version! I'm on multiple platforms. ;)

Great idea about sharing the util folder contents!
- already found cool util smt4dev via George Mauer's comment.

Here's the contents of my util folder

ab.exe
baretail.exe
grep.exe
jsl.exe
jsmin.exe
junction.exe
msxsl.exe
optipng.exe
smtp4dev.exe
tidy.exe
touch.exe
wget.exe



'tarn' on Mon, 22 Oct 2012 12:51:57 GMT, sez:

@secretGeek

mkdir ~/kv

echo 42 >>~/kv/answer

cat ~/kv/answer | tee >(pbcopy)

grep "4" ~/kv/*

find ~/kv/* -name "*"

rm -r ~/kv




name


website (optional)


enter the word:
 

comment (HTML not allowed)


All viewpoints welcome. Incivility is not tolerated, such comments are deleted.

 

I'm the co-author of TimeSnapper, a life analysis system that stores and plays-back your computer use. It makes timesheet recording a breeze, helps you recover lost work and shows you how to sharpen your act.

 

NimbleText - FREE text manipulation and data extraction

NimbleText is a Powerful FREE Tool

I wrote this, and use it every day for:

  • extracting data from text
  • manipulating text
  • generating code

It makes you look awesome. You should use NimbleText, you handsome devil!

 

Articles

The Canine Pyramid The Canine Pyramid
Humans: A Tragedy. Humans: A Tragedy.
ACK! ACK!
OfficeQuest... Gamification for the Office Suite OfficeQuest... Gamification for the Office Suite
New product launch: NimbleSET New product launch: NimbleSET
Programming The Robot from Diary of a Wimpy Kid Programming The Robot from Diary of a Wimpy Kid
Happy new year 2014 Happy new year 2014
Downtime as a service Downtime as a service
The Shape of Your Irrationality The Shape of Your Irrationality
This is why I don't go to nice restaurants any more. This is why I don't go to nice restaurants any more.
A flowchart of what programmers do at work all day A flowchart of what programmers do at work all day
The Telepresent Man. The Telepresent Man.
Interview with an Ex-Microsoftie. Interview with an Ex-Microsoftie.
CRUMBS! Commandline navigation tool for Powershell CRUMBS! Commandline navigation tool for Powershell
Little tool for making Amazon affiliate links Little tool for making Amazon affiliate links
Extracting a Trello board as markdown Extracting a Trello board as markdown
hgs: Manage Lots of Mercurial Projects Simultaneously hgs: Manage Lots of Mercurial Projects Simultaneously
You Must Get It! You Must Get It!
AddDays: A Very Simple Date Calculator AddDays: A Very Simple Date Calculator
Google caught in a lie. Google caught in a lie.
NimbleText 2.0: More Than Twice The Price! NimbleText 2.0: More Than Twice The Price!
A Computer Simulation of Creative Work, or 'How To Get Nothing Done' A Computer Simulation of Creative Work, or 'How To Get Nothing Done'
NimbleText 1.9 -- BoomTown! NimbleText 1.9 -- BoomTown!
Line Endings. Line Endings.
**This** is how you pivot **This** is how you pivot
Art of the command-line helper Art of the command-line helper
Go and read a book. Go and read a book.
Slurp up mega-traffic by writing scalable, timeless search-bait Slurp up mega-traffic by writing scalable, timeless search-bait
Do *NOT* try this Hacking Script at home Do *NOT* try this Hacking Script at home
The 'Should I automate it?' Calculator The 'Should I automate it?' Calculator

Archives Complete secretGeek Archives

TimeSnapper -- Automated Screenshot Journal TimeSnapper: automatic screenshot journal

25 steps for building a Micro-ISV 25 steps for building a Micro-ISV
3 minute guides -- babysteps in new technologies: powershell, JSON, watir, F# 3 Minute Guide Series
Universal Troubleshooting checklist Universal Troubleshooting Checklist
Top 10 SecretGeek articles Top 10 SecretGeek articles
ShinyPower (help with Powershell) ShinyPower
Now at CodePlex

Realtime CSS Editor, in a browser RealTime Online CSS Editor
Gradient Maker -- a tool for making background images that blend from one colour to another. Forget photoshop, this is the bomb. Gradient Maker



[powered by Google] 

How to be depressed How to be depressed
You are not inadequate.



Recommended Reading


the little schemer


The Best Software Writing I
The Business Of Software (Eric Sink)

Recommended blogs

Jeff Atwood
Joseph Cooney
Phil Haack
Scott Hanselman
Julia Lerman
Rhys Parry
Joel Pobar
OJ Reeves
Eric Sink

InfoText - amazing search for SharePoint
LogEnvy - event logs made sexy
Computer, Unlocked. A rapid computer customization resource
Aussie Bushwalking
BrisParks :: best parks for kids in brisbane
PhysioTec, Brisbane Specialist Physiotherapy & Pilates
 
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2006 .: privacy

home .: about .: sign up .: sitemap .: RSS .: © Leon Bambrick 2006 .: privacy