Skip to content

Instantly share code, notes, and snippets.

Created March 29, 2016 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/d53ea2b3279c4f17e14f to your computer and use it in GitHub Desktop.
Save anonymous/d53ea2b3279c4f17e14f to your computer and use it in GitHub Desktop.
DesGist
html, body {
height: 100%;
}
body {
padding: 1em 0;
background: #0072ff;
}
.input-group {
box-shadow: 0 0 25px #00162d;
}
.input-group, .form-control, .input-group-btn, .btn {
border-radius: 5px;
}
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="input-group">
<input type="text" class="form-control" data-action="genoutput" />
<span class="input-group-btn">
<button class="btn btn-default btn-primary" type="button" data-action="gen">
Generate!
</button>
</span>
</div>
</div>
</div>
</div>
function PasswordGen() {
var char = "0123456789abcdefghijklmnopqrstuvwxyz",
fullchar = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
genHash = "",
i;
for (i = 0; i < 8; i++) {
var rnum = Math.floor(Math.random() * char.length)
genHash += char.substring(rnum, rnum + 1)
}
$("[data-action=genoutput]").val(genHash)
}
$("[data-action=gen]").click(function() {
PasswordGen()
})
PasswordGen()
{"alertify":false,"angular":false,"bootstrap":true,"chartjs":false,"codemirror":false,"createjs":false,"d3":false,"dojo":false,"fabricjs":false,"jquery":true,"jqueryui":false,"jquerytools":false,"jqxsplitter":false,"jszip":false,"kinetic":false,"knockout":false,"modernizer":false,"mootools":false,"normalize":false,"paperjs":false,"polyui":false,"processingjs":false,"prototypejs":false,"qooxdoo":false,"raphael":false,"requirejs":false,"showdown":false,"scriptaculous":false,"snapsvg":false,"svgjs":false,"threejs":false,"underscorejs":false,"webfontloader":false,"yui":false,"zepto":false}
{"siteTitle":"HiFromGist","version":"4.5","editorFontSize":"20","description":"DesGist","author":"AuthoGist"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment