From ee7098457e3402c3e8d12a6e538f12f9f16f1978 Mon Sep 17 00:00:00 2001 From: joeykrim Date: Thu, 27 Feb 2014 17:57:37 -0500 Subject: [PATCH 1/3] Small typo Changed "its all open source" to "it's all open source" --- about.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/about.md b/about.md index b5d7cc6..69103d5 100644 --- a/about.md +++ b/about.md @@ -50,7 +50,7 @@ pastes. ## Open Source -Haste can easily be installed behind your network, and its all open source! +Haste can easily be installed behind your network, and it's all open source! * [haste-client](https://github.com/seejohnrun/haste-client) * [haste-server](https://github.com/seejohnrun/haste-server) From 028aa96b13de60e011ee92cb420c621cf79b11ef Mon Sep 17 00:00:00 2001 From: JonApps Date: Tue, 25 Mar 2014 02:20:05 +0100 Subject: [PATCH 2/3] phonetic keys can begin with vowel + added missing \'z\' to consontants --- lib/key_generators/phonetic.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/key_generators/phonetic.js b/lib/key_generators/phonetic.js index c95be82..3acfdfb 100644 --- a/lib/key_generators/phonetic.js +++ b/lib/key_generators/phonetic.js @@ -6,13 +6,14 @@ var PhoneticKeyGenerator = function(options) { // Generate a phonetic key PhoneticKeyGenerator.prototype.createKey = function(keyLength) { var text = ''; + var start = Math.round(Math.random() * 2); for (var i = 0; i < keyLength; i++) { - text += (i % 2 == 0) ? this.randConsonant() : this.randVowel(); + text += (i % 2 == start) ? this.randConsonant() : this.randVowel(); } return text; }; -PhoneticKeyGenerator.consonants = 'bcdfghjklmnpqrstvwxy'; +PhoneticKeyGenerator.consonants = 'bcdfghjklmnpqrstvwxyz'; PhoneticKeyGenerator.vowels = 'aeiou'; // Get an random vowel From bda2749879a446d654cd6dc2cdb9b279fcbc0902 Mon Sep 17 00:00:00 2001 From: JonApps Date: Tue, 25 Mar 2014 02:23:31 +0100 Subject: [PATCH 3/3] oops :beer: --- lib/key_generators/phonetic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/key_generators/phonetic.js b/lib/key_generators/phonetic.js index 3acfdfb..011900b 100644 --- a/lib/key_generators/phonetic.js +++ b/lib/key_generators/phonetic.js @@ -6,7 +6,7 @@ var PhoneticKeyGenerator = function(options) { // Generate a phonetic key PhoneticKeyGenerator.prototype.createKey = function(keyLength) { var text = ''; - var start = Math.round(Math.random() * 2); + var start = Math.round(Math.random()); for (var i = 0; i < keyLength; i++) { text += (i % 2 == start) ? this.randConsonant() : this.randVowel(); }