This is my first experiment with GitHub Gists and bl.ocks.org. View here: http://bl.ocks.org/lqueryvg/7139421
Last active
December 26, 2015 10:49
-
-
Save lqueryvg/7139421 to your computer and use it in GitHub Desktop.
PuTTYCS Filter Generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
$("#doit_button").click(function () { | |
var input_text = $("#textarea").val(); | |
var values_arr = input_text.match(/\S+/g); | |
$("#result_text").text("+" + values_arr.join("*;+") + "*"); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<h3>PuTTYCS Filter Generator</h3> | |
<p id="hints">Paste list of hosts into text area, then click Go. | |
<br>Multiple lines are supported. | |
<br>Whitespace will be removed.</p> | |
<textarea id="textarea" ROWS=10 COLS=40>host1 host2 host3</textarea> | |
</p> | |
<button id="doit_button">Go</button> | |
<p id="result_text"></p> | |
<script type='text/javascript' src='http://code.jquery.com/jquery-git.js'></script> | |
<script type='text/javascript' src='genfilter.js'></script> | |
<link rel="stylesheet" type="text/css" href="style.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
font-family: sans-serif; | |
} | |
#hints { | |
color: gray; | |
} | |
p { | |
font-size: 12px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment