Wednesday 24 September 2014

PuTTY default colours suck, so replace it with a better colour scheme like zenburn

PuTTY defaults to horrible combinations like using black background, with blue text for directories. WTH, after all these years?

Replace that with a better colour scheme. I came across Zenburn for PuTTY.


Step 1:

Go to


Step 2:

Save this as a .reg file. Make sure you're saving the content, and not ending up with the HTML of the github page.

Step 3:

Right click, and then select "Merge"

You'll know if it worked as you'll get a message

In PuTTY, a "Zenburn" session will be created. This has your new, better colours.

Step 4: (do this for all your existing entries)

NOTE: this assumes that 
a. your session only has the hostname as its contents, because that's all you'll be copying.
b. your hostname is the same as your putty session name

Load the existing entry you want to change.
Copy the hostname to clipboard
Load the Zenburn session.
Paste the hostname into the session name
Paste the hostname into the host details
Click on Save

Test it by opening this session. Colours shoud be better now.

Repeat for all your PuTTY session entries.


Tuesday 23 September 2014

Given a list of values, recursively go through subdirectories and find the matching files of a specific filename

Unix grep example:

fgrep -R -f sorted_untrusted_values_to_find.txt --include=".thisfile"

1. Given a list of values, contained in the file "sorted_unstrusted_values_to_find.txt", where each row has one value

-f sorted_untrusted_values_to_find.txt 

2. recursively traverse the subdirectories under our current location

 -R 

3. looking at the files named ".thisfile"

--include=".thisfile"

3. return the files that have a match