1

improved shift2 demo button

This commit is contained in:
Evan Pratten 2019-08-31 14:37:11 -04:00
parent 9a35d252dc
commit a9a3cc3e9c
No known key found for this signature in database
GPG Key ID: 93AC7B3D071356D3
34 changed files with 47 additions and 41 deletions

View File

@ -64,7 +64,7 @@ I have ported the core code from shift2 over to [brython](http://www.brython.inf
<input type="text" id="key" name="key" placeholder="Encoding key" required><br>
<input type="text" id="msg" name="msg" placeholder="Message" required size="30">
<button type="button" class="btn btn-primary" id="shift-button" >shift2 demo is loading...</button>
<button type="button" class="btn btn-primary" id="shift-button" disabled>shift2 demo is loading... (this may take a few seconds)</button>
</div>
@ -74,4 +74,4 @@ Due to the fact that shift2 can also be used as a library (as outlined in the [R
If you are interested in helping out, or taking on this idea for yourself, send me an email.
<!-- Python code -->
<script type="text/python" src="/assets/python/shift2demo.py"></script>
<script type="text/python" src="/assets/python/shift2/shift2demo.py"></script>

View File

@ -178,7 +178,7 @@ sub rsa4096/0xA61A2F1676E35144 2019-08-11 [] [expires: 2025-08-09]
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -1,3 +0,0 @@
__BRYTHON__.VFS_timestamp = 1567274019809
__BRYTHON__.use_VFS = true
__BRYTHON__.VFS = {}

File diff suppressed because one or more lines are too long

View File

@ -153,4 +153,7 @@ def doShiftDemo(_):
document["shift-button"].bind("click", doShiftDemo)
document["shift-button"].innerHTML = "Run Shift2"
# Set the button
document["shift-button"].innerHTML = "Run Shift2"
document["shift-button"].disabled = False

View File

@ -123,7 +123,7 @@ pip3 install tensorflow-gpu #for gpu processing
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -87,7 +87,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -100,7 +100,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -111,7 +111,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -125,7 +125,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -84,7 +84,7 @@ Your browser does not support audio players
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -124,7 +124,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -82,7 +82,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -82,7 +82,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -191,7 +191,7 @@ __<span class="o">()</span> <span class="o">{</span>/???/???/???n?f <span class=
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -112,7 +112,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -177,7 +177,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -101,7 +101,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -174,7 +174,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -95,7 +95,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -187,7 +187,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -107,7 +107,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -152,7 +152,7 @@ ibus-daemon <span class="nt">-drx</span>
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -113,7 +113,7 @@ shift2 <span class="nt">-h</span>
<p><input type="text" id="key" name="key" placeholder="Encoding key" required=""><br>
<input type="text" id="msg" name="msg" placeholder="Message" required="" size="30"></p>
<p><button type="button" class="btn btn-primary" id="shift-button">shift2 demo is loading…</button></p>
<p><button type="button" class="btn btn-primary" id="shift-button" disabled>shift2 demo is loading… (this may take a few seconds)</button></p>
</div>
@ -123,7 +123,7 @@ shift2 <span class="nt">-h</span>
<p>If you are interested in helping out, or taking on this idea for yourself, send me an email.</p>
<!-- Python code -->
<script type="text/python" src="/assets/python/shift2demo.py"></script>
<script type="text/python" src="/assets/python/shift2/shift2demo.py"></script>
</div>
@ -137,7 +137,7 @@ shift2 <span class="nt">-h</span>
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -108,7 +108,7 @@ Starting from the top, scroll through, and middle click on anything you want to
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -385,7 +385,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -52,7 +52,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.6">Jekyll</generator><link href="http://0.0.0.0:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://0.0.0.0:4000/" rel="alternate" type="text/html" /><updated>2019-08-31T14:25:59-04:00</updated><id>http://0.0.0.0:4000/feed.xml</id><title type="html">Evan Pratten</title><subtitle>Computer wizard, student, &lt;a href=&quot;https://frc5024.github.io&quot;&gt;@frc5024&lt;/a&gt; programming team lead, and radio enthusiast.</subtitle><entry><title type="html">I did some cleaning</title><link href="http://0.0.0.0:4000/blog/2019/08/27/github-cleanup" rel="alternate" type="text/html" title="I did some cleaning" /><published>2019-08-27T08:37:00-04:00</published><updated>2019-08-27T08:37:00-04:00</updated><id>http://0.0.0.0:4000/blog/2019/08/27/GitHub-cleanup</id><content type="html" xml:base="http://0.0.0.0:4000/blog/2019/08/27/github-cleanup">&lt;p&gt;As I am continuing to check items off my TODO list before school starts, I have come to an item I have been putting off for a while. &lt;strong&gt;Clean up GitHub Account&lt;/strong&gt;. Luckily, I discovered a little trick to make the process of deleting unused repos a little easier!&lt;/p&gt;
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.6">Jekyll</generator><link href="http://0.0.0.0:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://0.0.0.0:4000/" rel="alternate" type="text/html" /><updated>2019-08-31T14:36:54-04:00</updated><id>http://0.0.0.0:4000/feed.xml</id><title type="html">Evan Pratten</title><subtitle>Computer wizard, student, &lt;a href=&quot;https://frc5024.github.io&quot;&gt;@frc5024&lt;/a&gt; programming team lead, and radio enthusiast.</subtitle><entry><title type="html">I did some cleaning</title><link href="http://0.0.0.0:4000/blog/2019/08/27/github-cleanup" rel="alternate" type="text/html" title="I did some cleaning" /><published>2019-08-27T08:37:00-04:00</published><updated>2019-08-27T08:37:00-04:00</updated><id>http://0.0.0.0:4000/blog/2019/08/27/GitHub-cleanup</id><content type="html" xml:base="http://0.0.0.0:4000/blog/2019/08/27/github-cleanup">&lt;p&gt;As I am continuing to check items off my TODO list before school starts, I have come to an item I have been putting off for a while. &lt;strong&gt;Clean up GitHub Account&lt;/strong&gt;. Luckily, I discovered a little trick to make the process of deleting unused repos a little easier!&lt;/p&gt;
&lt;h2 id=&quot;getting-a-list-of-repos-to-delete&quot;&gt;Getting a list of repos to delete&lt;/h2&gt;
&lt;p&gt;I could have automated this, but I prefer a little control. To get the list, start by opening up a new Firefox window with a single tab. In this tab, open your GitHub profile to the list of repos.
@ -87,7 +87,7 @@ shift2 &lt;span class=&quot;nt&quot;&gt;-h&lt;/span&gt;
&lt;p&gt;&lt;input type=&quot;text&quot; id=&quot;key&quot; name=&quot;key&quot; placeholder=&quot;Encoding key&quot; required=&quot;&quot; /&gt;&lt;br /&gt;
&lt;input type=&quot;text&quot; id=&quot;msg&quot; name=&quot;msg&quot; placeholder=&quot;Message&quot; required=&quot;&quot; size=&quot;30&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot; id=&quot;shift-button&quot;&gt;shift2 demo is loading…&lt;/button&gt;&lt;/p&gt;
&lt;p&gt;&lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot; id=&quot;shift-button&quot; disabled=&quot;&quot;&gt;shift2 demo is loading… (this may take a few seconds)&lt;/button&gt;&lt;/p&gt;
&lt;/div&gt;
@ -97,7 +97,7 @@ shift2 &lt;span class=&quot;nt&quot;&gt;-h&lt;/span&gt;
&lt;p&gt;If you are interested in helping out, or taking on this idea for yourself, send me an email.&lt;/p&gt;
&lt;!-- Python code --&gt;
&lt;script type=&quot;text/python&quot; src=&quot;/assets/python/shift2demo.py&quot;&gt;&lt;/script&gt;</content><author><name></name></author><summary type="html">I have always been interested in text and data encoding, so last year, I made my first encoding tool. Shift64 was designed to take plaintext data with a key, and convert it into a block of base64 that could, in theory, only be decoded with the original key. I had a lot of fun with this tool, and a very stripped down version of it actually ended up as a bonus question on the 5024 Programming Test for 2018/2019. Yes, the key was in fact 5024.</summary></entry><entry><title type="html">How I set up ひらがな input on my laptop</title><link href="http://0.0.0.0:4000/blog/2019/08/12/setting-up-ja" rel="alternate" type="text/html" title="How I set up ひらがな input on my laptop" /><published>2019-08-12T15:40:00-04:00</published><updated>2019-08-12T15:40:00-04:00</updated><id>http://0.0.0.0:4000/blog/2019/08/12/Setting-up-JA</id><content type="html" xml:base="http://0.0.0.0:4000/blog/2019/08/12/setting-up-ja">&lt;p&gt;I am currently working with &lt;a href=&quot;https://en.wikipedia.org/wiki/Hiragana&quot;&gt;ひらがな&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Katakana&quot;&gt;かたかな&lt;/a&gt;, and, &lt;a href=&quot;https://en.wikipedia.org/wiki/Kanji&quot;&gt;かんじ&lt;/a&gt; in some projects, and needed a more reliable way to write than running some &lt;a href=&quot;https://en.wikipedia.org/wiki/Romanization_of_Japanese&quot;&gt;romaji&lt;/a&gt; through an online translator. So, this post will detail what I did to enable native inputs on my laptop. This guide is specifically for &lt;a href=&quot;https://i3wm.org/&quot;&gt;i3wm&lt;/a&gt;, because it does not obey system settings for languages and inputs.&lt;/p&gt;
&lt;script type=&quot;text/python&quot; src=&quot;/assets/python/shift2/shift2demo.py&quot;&gt;&lt;/script&gt;</content><author><name></name></author><summary type="html">I have always been interested in text and data encoding, so last year, I made my first encoding tool. Shift64 was designed to take plaintext data with a key, and convert it into a block of base64 that could, in theory, only be decoded with the original key. I had a lot of fun with this tool, and a very stripped down version of it actually ended up as a bonus question on the 5024 Programming Test for 2018/2019. Yes, the key was in fact 5024.</summary></entry><entry><title type="html">How I set up ひらがな input on my laptop</title><link href="http://0.0.0.0:4000/blog/2019/08/12/setting-up-ja" rel="alternate" type="text/html" title="How I set up ひらがな input on my laptop" /><published>2019-08-12T15:40:00-04:00</published><updated>2019-08-12T15:40:00-04:00</updated><id>http://0.0.0.0:4000/blog/2019/08/12/Setting-up-JA</id><content type="html" xml:base="http://0.0.0.0:4000/blog/2019/08/12/setting-up-ja">&lt;p&gt;I am currently working with &lt;a href=&quot;https://en.wikipedia.org/wiki/Hiragana&quot;&gt;ひらがな&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Katakana&quot;&gt;かたかな&lt;/a&gt;, and, &lt;a href=&quot;https://en.wikipedia.org/wiki/Kanji&quot;&gt;かんじ&lt;/a&gt; in some projects, and needed a more reliable way to write than running some &lt;a href=&quot;https://en.wikipedia.org/wiki/Romanization_of_Japanese&quot;&gt;romaji&lt;/a&gt; through an online translator. So, this post will detail what I did to enable native inputs on my laptop. This guide is specifically for &lt;a href=&quot;https://i3wm.org/&quot;&gt;i3wm&lt;/a&gt;, because it does not obey system settings for languages and inputs.&lt;/p&gt;
&lt;h2 id=&quot;adding-font-support-to-linux&quot;&gt;Adding font support to Linux&lt;/h2&gt;
&lt;p&gt;Firstly, we need fonts. Depending on your system, these may already be installed. For Japanese, I only used &lt;code class=&quot;highlighter-rouge&quot;&gt;vlgothic&lt;/code&gt;, so here in the package for it:&lt;/p&gt;

View File

@ -88,7 +88,7 @@ https://blog.mrtnrdl.de/feed.xml
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -101,7 +101,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -146,7 +146,7 @@
<span class="site-info">
Site design by: <a href="https://retrylife.ca">Evan Pratten</a> |
This site was last updated at: 2019-08-31 14:25:59 -0400
This site was last updated at: 2019-08-31 14:36:54 -0400
</span>
</div>

View File

@ -1,3 +0,0 @@
__BRYTHON__.VFS_timestamp = 1567274019809
__BRYTHON__.use_VFS = true
__BRYTHON__.VFS = {}

File diff suppressed because one or more lines are too long

View File

@ -153,4 +153,7 @@ def doShiftDemo(_):
document["shift-button"].bind("click", doShiftDemo)
document["shift-button"].innerHTML = "Run Shift2"
# Set the button
document["shift-button"].innerHTML = "Run Shift2"
document["shift-button"].disabled = False