<commit_before>---
layout: defaultKeyshanc
title: Keyshanc
description: Homepage for Keyshanc, the KEYboard SHA-based eNCrypter.
---
<div id="home">
<h1>Welcome</h1>
<div class="social">
  <div class="share">
    <div class="g-plusone" data-size="medium"></div>
  </div>
  <div class="share">
    <iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?hashtags=keyshanc&via=ac_reed&count=horizontal" style="width:115px; height:21px;"></iframe>
  </div>
</div>
<br />
<p>This is the homepage for Keyshanc, the KEYboard SHA-based eNCrypter. Read more about Keyshanc on <a href="http://andrewcreed.com/blog.html">my blog</a>.</p>
<div id="twitter-connect-placeholder"></div>
<div id="data"></div>
</div>
<script type="text/javascript" charset="utf-8">
   function fetchTweets(searchScreenName, password) {
         
         var urlScreenname = new String("http://twitter.com/statuses/user_timeline/" + searchScreenName + ".json?callback=?");
         $.ajax({  
            url : urlScreenname,  
            dataType : "json",  
            timeout:15000,  
  
            success : function(data)  
               {  
                  $('#data').html('');
                  for (i=0; i<data.length; i++)  
                     {  
                        data[i].text = decryptKeyshancRT(data[i].text, password);
                        $('#data').append("<hr /><p>" + data[i].text.linkify() + "</p>");
                        timeSince = relative_time(data[i].created_at);
                        $('#data').append("<p>" + timeSince + "</p>");  
                     }
                  twttr.anywhere(function (T) {
                     T.hovercards();
                  });
               },  
  
            error : function()  
               {  
                  alert("Failure!");  
               },  
         });
   }

   twttr.anywhere(function (T) {
     T.hovercards();
   });

   twttr.anywhere(function (T) {
      var currentUser,
          screenName,
          profileImage,
          profileImageTag,
          timeSince,
          encryptedTweet;

      if (T.isConnected()) {
         currentUser = T.currentUser;
         screenName = currentUser.data('screen_name');
         profileImage = currentUser.data('profile_image_url');
         profileImageTag = "<img src='" + profileImage + "'/>";
         $('#twitter-connect-placeholder').html("Logged in as " + profileImageTag + " @" + screenName + "<br />");
         $("#twitter-connect-placeholder").append('<button id="signout" type="button">Sign out of Twitter</button><br />');
         $("#signout").bind("click", function () {
            twttr.anywhere.signOut();
            location.reload();
         });
         $('#twitter-connect-placeholder').append("<h2>Send an Encrypted Tweet</h2>");
         $('#twitter-connect-placeholder').append("Password to Encrypt with:<br />");
         $('#twitter-connect-placeholder').append('<input type="password" id="encryptPassword" /><br />');
         $('#twitter-connect-placeholder').append("Text that <b>should not</b> be encrypted (e.g. Twitter @usernames, #hashtags, etc.):<br />");
         $('#twitter-connect-placeholder').append('<textarea rows="4" cols="60" id="plainText"></textarea><br />');
         $("#plainText").bind("keypress", function () {
            encryptedTweet = encryptKeyshancRT(document.getElementById('encryptPassword').value);
            $("#dynamicTweet").html('');
            T("#dynamicTweet").tweetBox({
               label: "Keyshanc Output",
               defaultContent: encryptedTweet
            });
         });
         $('#twitter-connect-placeholder').append("Text that <b>will</b> be encrypted (Tip: If you want to encrypt a URL, use a URL shortener since Twitter won't automatically shorten with t.co):<br />");
         $('#twitter-connect-placeholder').append('<textarea rows="4" cols="60" id="inText"></textarea><br />');
         $("#inText").bind("keypress", function () {
            encryptedTweet = encryptKeyshancRT(document.getElementById('encryptPassword').value);
            $("#dynamicTweet").html('');
            T("#dynamicTweet").tweetBox({
               label: "Keyshanc Output",
               defaultContent: encryptedTweet
            });
         });
         $('#twitter-connect-placeholder').append('<div id="dynamicTweet"></div><br /><hr />');
         $('#twitter-connect-placeholder').append("<h2>Decrypt a User's Tweets</h2>");
         $('#twitter-connect-placeholder').append("Twitter Username to Search:<br />");
         $('#twitter-connect-placeholder').append('@<input type="text" id="searchScreenName" /><br />');
         $('#twitter-connect-placeholder').append("Password to Decrypt with:<br />");
         $('#twitter-connect-placeholder').append('<input type="password" id="decryptPassword" /><br />');
         $("#twitter-connect-placeholder").append('<button id="fetchAndDecrypt" type="button">Fetch and Decrypt Tweets</button><br />');
         $("#fetchAndDecrypt").bind("click", function () {
            fetchTweets(document.getElementById('searchScreenName').value, document.getElementById('decryptPassword').value);
         });
      } else {
         T("#twitter-connect-placeholder").connectButton();
         $('#twitter-connect-placeholder').append("Once connected with Twitter, please refresh the page.");
      };
   });


<commit_msg>Added instructions.<commit_after>---
layout: defaultKeyshanc
title: Keyshanc
description: Homepage for Keyshanc, the KEYboard SHA-based eNCrypter.
---
<div id="home">
<h1>Welcome</h1>
<div class="social">
  <div class="share">
    <div class="g-plusone" data-size="medium"></div>
  </div>
  <div class="share">
    <iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?hashtags=keyshanc&via=ac_reed&count=horizontal" style="width:115px; height:21px;"></iframe>
  </div>
</div>
<br />
<p>This is the homepage for Keyshanc, the KEYboard SHA-based eNCrypter. Read more about Keyshanc on <a href="http://andrewcreed.com/blog.html">my blog</a>.</p>
<div id="twitter-connect-placeholder"></div>
<div id="data"></div>
</div>
<script type="text/javascript" charset="utf-8">
   function fetchTweets(searchScreenName, password) {
         
         var urlScreenname = new String("http://twitter.com/statuses/user_timeline/" + searchScreenName + ".json?callback=?");
         $.ajax({  
            url : urlScreenname,  
            dataType : "json",  
            timeout:15000,  
  
            success : function(data)  
               {  
                  $('#data').html('');
                  for (i=0; i<data.length; i++)  
                     {  
                        data[i].text = decryptKeyshancRT(data[i].text, password);
                        $('#data').append("<hr /><p>" + data[i].text.linkify() + "</p>");
                        timeSince = relative_time(data[i].created_at);
                        $('#data').append("<p>" + timeSince + "</p>");  
                     }
                  twttr.anywhere(function (T) {
                     T.hovercards();
                  });
               },  
  
            error : function()  
               {  
                  alert("Failure!");  
               },  
         });
   }

   twttr.anywhere(function (T) {
     T.hovercards();
   });

   twttr.anywhere(function (T) {
      var currentUser,
          screenName,
          profileImage,
          profileImageTag,
          timeSince,
          encryptedTweet;

      if (T.isConnected()) {
         currentUser = T.currentUser;
         screenName = currentUser.data('screen_name');
         profileImage = currentUser.data('profile_image_url');
         profileImageTag = "<img src='" + profileImage + "'/>";
         $('#twitter-connect-placeholder').html("Logged in as " + profileImageTag + " @" + screenName + "<br />");
         $("#twitter-connect-placeholder").append('<button id="signout" type="button">Sign out of Twitter</button><br />');
         $("#signout").bind("click", function () {
            twttr.anywhere.signOut();
            location.reload();
         });
         $('#twitter-connect-placeholder').append("<h2>Send an Encrypted Tweet</h2>");
         $('#twitter-connect-placeholder').append("Password to Encrypt with:<br />");
         $('#twitter-connect-placeholder').append('<input type="password" id="encryptPassword" /><br />');
         $('#twitter-connect-placeholder').append("Text that <b>should not</b> be encrypted (e.g. Twitter @usernames, #hashtags, etc.):<br />");
         $('#twitter-connect-placeholder').append('<textarea rows="4" cols="60" id="plainText"></textarea><br />');
         $("#plainText").bind("keypress", function () {
            encryptedTweet = encryptKeyshancRT(document.getElementById('encryptPassword').value);
            $("#dynamicTweet").html('');
            T("#dynamicTweet").tweetBox({
               label: "Keyshanc Output",
               defaultContent: encryptedTweet
            });
         });
         $('#twitter-connect-placeholder').append("Text that <b>will</b> be encrypted (Tip: If you want to encrypt a URL, use a URL shortener since Twitter won't automatically shorten with t.co):<br />");
         $('#twitter-connect-placeholder').append('<textarea rows="4" cols="60" id="inText"></textarea><br />');
         $("#inText").bind("keypress", function () {
            encryptedTweet = encryptKeyshancRT(document.getElementById('encryptPassword').value);
            $("#dynamicTweet").html('');
            T("#dynamicTweet").tweetBox({
               label: "Keyshanc Output",
               defaultContent: encryptedTweet
            });
         });
         $('#twitter-connect-placeholder').append('<div id="dynamicTweet"></div><br /><hr />');
         $('#twitter-connect-placeholder').append("<h2>Decrypt a User's Tweets</h2>");
         $('#twitter-connect-placeholder').append("Twitter Username to Search:<br />");
         $('#twitter-connect-placeholder').append('@<input type="text" id="searchScreenName" /><br />');
         $('#twitter-connect-placeholder').append("Password to Decrypt with:<br />");
         $('#twitter-connect-placeholder').append('<input type="password" id="decryptPassword" /><br />');
         $("#twitter-connect-placeholder").append('<button id="fetchAndDecrypt" type="button">Fetch and Decrypt Tweets</button><br />');
         $("#fetchAndDecrypt").bind("click", function () {
            fetchTweets(document.getElementById('searchScreenName').value, document.getElementById('decryptPassword').value);
         });
      } else {
         T("#twitter-connect-placeholder").connectButton();
         $('#twitter-connect-placeholder').append("<p>Login and connect with Twitter to send and receive encrypted Tweets. Once connected with Twitter, please refresh the page.</p>");
      };
   });



{'fraction_non_alphanumeric': 0.18096367950355904, 'fraction_numerical': 0.004562876437306078, 'mean_word_length': 2.54889896373057, 'pattern_counts': {'":': 0, '<': 139, '<?xml version=': 0, '>': 137, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '69869', 'n_tokens_mistral': 3082, 'n_tokens_neox': 3027, 'n_words': 536}