Skip to content

Instantly share code, notes, and snippets.

@AgeOfMarcus
Last active August 17, 2020 17:33
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 AgeOfMarcus/45e9884ce8df9b582794d9097dfcb9ee to your computer and use it in GitHub Desktop.
Save AgeOfMarcus/45e9884ce8df9b582794d9097dfcb9ee to your computer and use it in GitHub Desktop.
blog.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "blog.ipynb",
"provenance": [],
"collapsed_sections": [],
"authorship_tag": "ABX9TyNLUPT1cTu6Z1EmytpdPd9r",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/AgeOfMarcus/45e9884ce8df9b582794d9097dfcb9ee/blog.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"metadata": {
"id": "6Q8ZAT7VdLyI",
"colab_type": "code",
"colab": {
"resources": {
"http://localhost:8080/static/styles.css": {
"data": "CjwhRE9DVFlQRSBodG1sPgo8aHRtbCBsYW5nPWVuPgogIDxtZXRhIGNoYXJzZXQ9dXRmLTg+CiAgPG1ldGEgbmFtZT12aWV3cG9ydCBjb250ZW50PSJpbml0aWFsLXNjYWxlPTEsIG1pbmltdW0tc2NhbGU9MSwgd2lkdGg9ZGV2aWNlLXdpZHRoIj4KICA8dGl0bGU+RXJyb3IgNDA0IChOb3QgRm91bmQpISExPC90aXRsZT4KICA8c3R5bGU+CiAgICAqe21hcmdpbjowO3BhZGRpbmc6MH1odG1sLGNvZGV7Zm9udDoxNXB4LzIycHggYXJpYWwsc2Fucy1zZXJpZn1odG1se2JhY2tncm91bmQ6I2ZmZjtjb2xvcjojMjIyO3BhZGRpb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2dyb3VuZDp1cmwoLy93d3cuZ29vZ2xlLmNvbS9pbWFnZXMvbG9nb3MvZXJyb3JwYWdlL2Vycm9yX2xvZ28tMTUweDU0LTJ4LnBuZykgbm8tcmVwZWF0Oy13ZWJraXQtYmFja2dyb3VuZC1zaXplOjEwMCUgMTAwJX19I2xvZ297ZGlzcGxheTppbmxpbmUtYmxvY2s7aGVpZ2h0OjU0cHg7d2lkdGg6MTUwcHh9CiAgPC9zdHlsZT4KICA8YSBocmVmPS8vd3d3Lmdvb2dsZS5jb20vPjxzcGFuIGlkPWxvZ28gYXJpYS1sYWJlbD1Hb29nbGU+PC9zcGFuPjwvYT4KICA8cD48Yj40MDQuPC9iPiA8aW5zPlRoYXTigJlzIGFuIGVycm9yLjwvaW5zPgogIDxwPiAgPGlucz5UaGF04oCZcyBhbGwgd2Uga25vdy48L2lucz4K",
"ok": false,
"headers": [
[
"content-length",
"1449"
],
[
"content-type",
"text/html; charset=utf-8"
]
],
"status": 404,
"status_text": ""
},
"http://localhost:8080/static/code.css": {
"data": "CjwhRE9DVFlQRSBodG1sPgo8aHRtbCBsYW5nPWVuPgogIDxtZXRhIGNoYXJzZXQ9dXRmLTg+CiAgPG1ldGEgbmFtZT12aWV3cG9ydCBjb250ZW50PSJpbml0aWFsLXNjYWxlPTEsIG1pbmltdW0tc2NhbGU9MSwgd2lkdGg9ZGV2aWNlLXdpZHRoIj4KICA8dGl0bGU+RXJyb3IgNDA0IChOb3QgRm91bmQpISExPC90aXRsZT4KICA8c3R5bGU+CiAgICAqe21hcmdpbjowO3BhZGRpbmc6MH1odG1sLGNvZGV7Zm9udDoxNXB4LzIycHggYXJpYWwsc2Fucy1zZXJpZn1odG1se2JhY2tncm91bmQ6I2ZmZjtjb2xvcjojMjIyO3BhZGRpbmc6MTVweH1ib2R5e21hcmdpbjo3JSBhdXRvIDA7bWF4LXdpZHRoOjM5MHB4O21pbi1oZWlnaHQ6MTgwcHg7cGFkZGluZzozMHB4IDAgMTVweH0qID4gYm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WF0Oy13ZWJraXQtYmFja2dyb3VuZC1zaXplOjEwMCUgMTAwJX19I2xvZ297ZGlzcGxheTppbmxpbmUtYmxvY2s7aGVpZ2h0OjU0cHg7d2lkdGg6MTUwcHh9CiAgPC9zdHlsZT4KICA8YSBocmVmPS8vd3d3Lmdvb2dsZS5jb20vPjxzcGFuIGlkPWxvZ28gYXJpYS1sYWJlbD1Hb29nbGU+PC9zcGFuPjwvYT4KICA8cD48Yj40MDQuPC9iPiA8aW5zPlRoYXTigJlzIGFuIGVycm9yLjwvaW5zPgogIDxwPiAgPGlucz5UaGF04oCZcyBhbGwgd2Uga25vdy48L2lucz4K",
"ok": false,
"headers": [
[
"content-length",
"1449"
],
[
"content-type",
"text/html; charset=utf-8"
]
],
"status": 404,
"status_text": ""
},
"http://localhost:8080/cdn-cgi/apps/head/LYm5RlS3MpdIp8jHi77A2QDipLE.js": {
"data": "CjwhRE9DVFlQRSBodG1sPgo8aHRtbCBsYW5nPWVuPgogIDxtZXRhIGNoYXJzZXQ9dXRmLTg+CiAgPG1ldGEgbmFtZT12aWV3cG9ydCBjb250ZW50PSJpbml0aWFsLXNjYWxlPTEsIG1pbmltdW0tc2NhbGU9MSwgd2lkdGg9ZGV2aWNlLXdpZHRoIj4KICA8dGl0bGU+RXJyb3IgNDA0IChOb3QgRm91bmQpISExPC90aXRsZT4KICA8c3R5bGU+CiAgICAqe21hcmdpbjowO3BhZGRpbmc6MH1odG1sLGNvZGV7Zm9udDoxNXB4LzIycHggYXJpYWwsc2Fucy1zZXJpZn1odG1se2JhY2tncm91bmQ6I2ZmZjtjb2xvcjojMjIyO3BhZGRpbmc6MTVweH1ib2R5e21hcmdpbjo3JSBhdXRvIDA7bWF4LXdpZHRoOjM5MHB4O21pbi1oZWlnaHQ6MTgwcHg7cGFkZGluZzozMHB4IDAgMTVweH0qID4gYm9keXtiYWNrZ3JvdW5kOnVybCgvL3d3dy5nb29nbGUuY29tL2ltYWdlcy9lcnJvcnMvcm9ib3QucG5nKS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xvY2s7aGVpZ2h0OjU0cHg7d2lkdGg6MTUwcHh9CiAgPC9zdHlsZT4KICA8YSBocmVmPS8vd3d3Lmdvb2dsZS5jb20vPjxzcGFuIGlkPWxvZ28gYXJpYS1sYWJlbD1Hb29nbGU+PC9zcGFuPjwvYT4KICA8cD48Yj40MDQuPC9iPiA8aW5zPlRoYXTigJlzIGFuIGVycm9yLjwvaW5zPgogIDxwPiAgPGlucz5UaGF04oCZcyBhbGwgd2Uga25vdy48L2lucz4K",
"ok": false,
"headers": [
[
"content-length",
"1449"
],
[
"content-type",
"text/html; charset=utf-8"
]
],
"status": 404,
"status_text": ""
}
},
"base_uri": "https://localhost:8080/",
"height": 1000
},
"outputId": "ea176f64-0af2-4971-ab3f-89b3cf5057c6"
},
"source": [
"from IPython.display import HTML\n",
"import requests\n",
"\n",
"blog = requests.get('https://notes.marcusj.tech/link/blog')\n",
"HTML(blog.content.decode())"
],
"execution_count": 1,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/html": [
"\n",
"<script src=\"/cdn-cgi/apps/head/LYm5RlS3MpdIp8jHi77A2QDipLE.js\"></script><link rel='stylesheet' href='/static/styles.css'>\n",
"<link rel='stylesheet' href='/static/code.css'>\n",
"<link rel=\"stylesheet\" href=\"https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic\">\n",
"<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css\">\n",
"<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.0/milligram.css\">\n",
"<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js\"></script>\n",
"<script src='/static/notify.min.js'></script>\n",
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n",
"<script src='/static/request.js'></script>\n",
"<br><p><title>blog.marcusj.tech</title></p>\n",
"<h1 id=\"blogmarcusjtechhttpsblogmarcusjtech\"><a target=\"_blank\" href=\"https://blog.marcusj.tech\">blog.marcusj.tech</a></h1>\n",
"<blockquote>\n",
"<p>Welcome to my blog. It's actually very poorly coded. This is all being loaded from a note I created on <a target=\"_blank\" href=\"https://notes.marcusj.tech\">my markdown note taking and publishing website</a>. The plus side is that I only have to edit this note and my blog get's updated automatically, thanks to <a target=\"_blank\" href=\"https://notes.marcusj.tech/links/public\">the public linking system</a> I made.</p>\n",
"</blockquote>\n",
"<h4 id=\"click-here-to-view-an-auto-generated-feed-of-my-posts-on-repltalkhttpsblogmarcusjtechfeed\"><a target=\"_blank\" href=\"https://blog.marcusj.tech/feed\">Click here to view an auto-generated feed of my posts on repltalk</a></h4>\n",
"<p>Todays date is <span id=\"44c7467c-f786-407f-8c9a-4ecd14006228\"></span><script>document.getElementById(\"44c7467c-f786-407f-8c9a-4ecd14006228\").innerHTML = eval(\"(new Date()).toString()\")</script></p>\n",
"<h4 id=\"pizza-balls-pb\">Pizza balls <sup class=\"footnote-ref\" id=\"fnref-pb\"><a href=\"#fn-pb\">1</a></sup></h4>\n",
"<hr />\n",
"<div class='container'>\n",
"<h2 id=\"pasting-images\">Pasting Images</h2>\n",
"<h4 id=\"2020-08-14\">2020-08-14</h4>\n",
"<p>I just added pasting images to <a target=\"_blank\" href=\"https://repl.email\">repl.email</a>! Go check it out! Images are uploaded to i.marcusj.tech and embedded via their URL.</p>\n",
"<hr />\n",
"<h2 id=\"quoted-printables\">quoted printables</h2>\n",
"<h4 id=\"2020-08-14-2\">2020-08-14</h4>\n",
"<p><strong><em>I hate quoted printables</em></strong>.</p>\n",
"<p>Why are they even a thing? Look what I had to do just to get the HTML of an email properly:</p>\n",
"<div class=\"codehilite\"><pre><span></span><code><span class=\"n\">body</span> <span class=\"o\">=</span> <span class=\"n\">quopri</span><span class=\"o\">.</span><span class=\"n\">decodestring</span><span class=\"p\">(</span><span class=\"n\">message</span><span class=\"o\">.</span><span class=\"n\">get_payload</span><span class=\"p\">())</span><span class=\"o\">.</span><span class=\"n\">strip</span><span class=\"p\">()</span><span class=\"o\">.</span><span class=\"n\">decode</span><span class=\"p\">(</span><span class=\"n\">errors</span><span class=\"o\">=</span><span class=\"s2\">&quot;ignore&quot;</span><span class=\"p\">)</span>\n",
"</code></pre></div>\n",
"<p>At least I finally figured it out, though.</p>\n",
"<hr />\n",
"<h2 id=\"replemail-update\">repl.email update</h2>\n",
"<h4 id=\"2020-08-14-3\">2020-08-14</h4>\n",
"<p>I realised all messages were being sent as HTML so that's a new fix, also I've added the option to toggle viewing HTML/Text which is good cause sometimes stuff doesn't render well. I now need to work on replying to emails because that's becoming a bother. I think I might change to the <code>imaplib</code> library but it's a lot more complicated to get emails. I might just add it in alongside <code>imapclient</code>. </p>\n",
"<p>Multipart emails should also work better now, but still only text/html is rendered client-side. But other parts should also get sent to the client, just not displayed yet.</p>\n",
"<p>I've started work on https://paste.marcusj.tech - which I'll hopefully integrate to allow users to create password-protected emails. And I also want to integrate https://i.marcusj.tech at some point. </p>\n",
"<hr />\n",
"<h2 id=\"replemail-brief-update\">repl.email brief update</h2>\n",
"<h4 id=\"2020-08-13\">2020-08-13</h4>\n",
"<p>Well, I fixed a bunch of bugs, so I might not need Rafi's help after all but I'll probably work on the design with him in the future and revamp it. I might move the entire client to a seperate repl so people can fork it and make their own changes. Plus, most of the interaction between client and server is done though an API, anyway. </p>\n",
"<p>So, at the time of writing this, the base functionality is done. You can send, recieve, and delete emails. I thought about creating a post on repl talk to announce this, but I think I'll rather add some more features and stuff before I do, in the hopes that people will like it and continue to use it. I think the next thing I'm going to work on is a proper markdown editor.</p>\n",
"<p><em>Oh, I forgot to add, but I put in functionality to forward emails. Once I check that's working I'll have to get around to adding a settings page where users can chose an address to forward emails to.</em></p>\n",
"<hr />\n",
"<h2 id=\"replemail\">repl.email</h2>\n",
"<h4 id=\"2020-08-13-2\">2020-08-13</h4>\n",
"<p>Well, I decided I wanted to host my own email service. And the domain <code>repl.email</code> wasn't taken so I figured let's do it. I have no actual mailserver, though, and nowhere to host one. So I'm doing it without. If you want to read more about that whole fiasco, <a target=\"_blank\" href=\"https://notes.marcusj.tech/link/repl.email\">click here</a>. </p>\n",
"<p>It's going pretty well so far, the actual email service itself works fine. It's just the <a target=\"_blank\" href=\"https://repl.email/app\">web app</a> that's sucky. I'm horrible and HTML and CSS and whatnot, as I've said a million times. I'm gonna try get my friend <a target=\"_blank\" href=\"https://repl.it/@rafrafraf\">rafi</a> to help with that, though, cause he's sick at that sort of stuff.</p>\n",
"<p>I have big aspirations for this project. As of now, you can only login through repl.it, and I think I'm gonna keep it that way. I also want to try integrate it with repl.it as much as possible. I'm gonna add a way to embed repls, share code, tag people (kinda), and more. I also want to add some sort of markdown editor (kind of like this) in. You can already write emails in markdown, there's just no preview. Viewing emails kinda works, but not really. Sending them works perfectly. I might add a way to attatch files, probably not, but I'll make it simple to add images via <a target=\"_blank\" href=\"https://i.marcusj.tech\">my image hosting service</a>.</p>\n",
"<h3 id=\"click-here-to-check-it-outhttpsreplemail\"><a target=\"_blank\" href=\"https://repl.email\">Click here to check it out</a></h3>\n",
"<hr />\n",
"<h2 id=\"repl-auth\">Repl Auth</h2>\n",
"<h4 id=\"2020-08-12\">2020-08-12</h4>\n",
"<p>Repl auth has now been added! I have some security concerns due to the fact that it appears it's just confirmed through headers, but I'm not sure how cross-site headers work so I guess we'll find out. Also for some reason the auth card appears on the left of the screen, whereas I need it in the center so it looks sexy.</p>\n",
"<p>Here's a demo:</p>\n",
"<script authed='alert(\"Authed!\")' src='/static/auth.js'></script>\n",
"<hr />\n",
"<h2 id=\"voice-recognition-in-under-30-lines-of-javascript\">Voice Recognition in under 30 lines of JavaScript</h2>\n",
"<h4 id=\"2020-08-12-2\">2020-08-12</h4>\n",
"<p>I recently discovered a <a target=\"_blank\" href=\"https://github.com/TalAter/annyang\">new JavaScript library</a> that lets you do some <a target=\"_blank\" href=\"https://voice.marcusweinberger.repl.co\">pretty cool stuff</a>. It has <strong>no dependencies</strong>, is only <strong>2 KB</strong>, and is under the MIT License, so you can essentially do <em>what you want</em> with it. And man, it is easy as fuck to use. All you have to do is define a couple commands like so:</p>\n",
"<div class=\"codehilite\"><pre><span></span><code><span class=\"kd\">var</span> <span class=\"nx\">commands</span> <span class=\"o\">=</span> <span class=\"p\">{</span>\n",
" <span class=\"s1\">&#39;hello&#39;</span><span class=\"o\">:</span> <span class=\"p\">()</span> <span class=\"p\">=&gt;</span> <span class=\"p\">{</span> <span class=\"nx\">alert</span><span class=\"p\">(</span><span class=\"s1\">&#39;Hello, world!&#39;</span><span class=\"p\">)</span> <span class=\"p\">},</span>\n",
" <span class=\"s1\">&#39;ask (me) my *thing&#39;</span><span class=\"o\">:</span> <span class=\"p\">(</span><span class=\"nx\">thing</span><span class=\"p\">)</span> <span class=\"p\">=&gt;</span> <span class=\"p\">{</span> <span class=\"nx\">prompt</span><span class=\"p\">(</span><span class=\"s2\">&quot;What is your &quot;</span> <span class=\"o\">+</span> <span class=\"nx\">thing</span> <span class=\"o\">+</span> <span class=\"s2\">&quot;?&quot;</span><span class=\"p\">)</span> <span class=\"p\">},</span>\n",
" <span class=\"s1\">&#39;search (for) *query&#39;</span><span class=\"o\">:</span> <span class=\"p\">(</span><span class=\"nx\">q</span><span class=\"p\">)</span> <span class=\"p\">=&gt;</span> <span class=\"p\">{</span> <span class=\"nb\">window</span><span class=\"p\">.</span><span class=\"nx\">location</span><span class=\"p\">.</span><span class=\"nx\">href</span> <span class=\"o\">=</span> <span class=\"s2\">&quot;https://google.com/search?q=&quot;</span> <span class=\"o\">+</span> <span class=\"nx\">q</span> <span class=\"p\">},</span>\n",
"<span class=\"p\">}</span>\n",
"</code></pre></div>\n",
"<p>And that's all it takes. Simply import the script, load the commands, and start annyang. And boom. <strong><em>Voice assistant</em></strong>. So I made <a target=\"_blank\" href=\"https://repl.it/talk/share/Create-a-powerful-voice-assistant-in-just-a-few-lines-of-code/49265\">a post on repl talk</a>, and I'm looking forward to seeing what people do with it. I know I definitely am gonna try making a cool voice assistant. </p>\n",
"<hr />\n",
"<h2 id=\"fourth-post-i-gotta-start-giving-these-titles\">Fourth Post - I gotta start giving these titles</h2>\n",
"<h4 id=\"2020-08-11\">2020-08-11</h4>\n",
"<p>Yes it's still the same date. So what if this is the fourth post I've made today? I'm testing new features. After a slight hiccup with <code>localStorage</code> and <code>openNote</code> I am proud to announce that you can now edit multiple notes in a single session, and then when you click save it will update them all. Very cool, Kanye. <code>Autosave</code> is also back! Yayyyy. </p>\n",
"<p>A couple people have reported issues with creating links, and I'm seeing some errors in the console about a trailing <code>/</code> or something. But I have no clue why it's happening or how to fix it.</p>\n",
"<p><img src='https://i.marcusj.tech/i/98' width='70%'></img></p>\n",
"<p>If anyone has experience with Google Firebase/Firestore and has any suggestions, send me an email at <a target=\"_blank\" href=\"/cdn-cgi/l/email-protection#2944485b4a5c5a435e074f5d5e694e44484045074a4644\"><span class=\"__cf_email__\" data-cfemail=\"f59894879680869f82db938182b59298949c99db969a98\">[email&#160;protected]</span></a>.</p>\n",
"<hr />\n",
"<h2 id=\"third-post\">Third Post</h2>\n",
"<h4 id=\"2020-08-11-2\">2020-08-11</h4>\n",
"<p>Live Javascript is pretty cool. I need some more ideas for expressions. And a better name for them. By expressions, I mean doing stuff like <code>{{</code>date<code>}}</code>. Right now I have four. <code>date</code>, <code>time</code>, <code>js</code>, and <code>counter</code>. The last one is pretty neat but it has limited use. I think maybe embedding simple forms would be neat since Markdown doesn't have a way to do that. I wish there was a simple way to extend the Markdown Syntax. Maybe I'll look at <code>python-markdown2</code> (what I'm using for <code>/link/*</code> because I know that has <em>extras</em>. </p>\n",
"<hr />\n",
"<h2 id=\"second-post\">Second post</h2>\n",
"<h4 id=\"2020-08-11-3\">2020-08-11</h4>\n",
"<p>I think I might start working on creating entire websites inside this note-taking system. Just think it would be a cool concept. Now I'm gonna try something neat. </p>\n",
"<p><button onclick=\"doPOST('/click', {'id':'ef3c7e77-7c87-42fa-81a3-e05f4ddae6a0'}, function(res) { document.getElementById('ef3c7e77-7c87-42fa-81a3-e05f4ddae6a0').innerText = res['count'] } )\"><span id='ef3c7e77-7c87-42fa-81a3-e05f4ddae6a0'>x</span> likes</button></p>\n",
"<hr />\n",
"<h2 id=\"first-post\">First post</h2>\n",
"<h4 id=\"2020-08-11-4\">2020-08-11</h4>\n",
"<p>This is an example of a first post. My goal is to allow users to enclose JavaScript inside two pairs of braces. What this should do is render the result of said JavaScript in between them.</p>\n",
"<hr />\n",
"</div>\n",
"<div class=\"footnotes\">\n",
"<hr />\n",
"<ol>\n",
"<li id=\"fn-pb\">\n",
"<p><img src=\"https://i.marcusj.tech/i/27\" alt=\"pb\" />&#160;<a href=\"#fnref-pb\" class=\"footnoteBackLink\" title=\"Jump back to footnote 1 in the text.\">&#8617;</a></p>\n",
"</li>\n",
"</ol>\n",
"</div>\n",
"<script data-cfasync=\"false\" src=\"/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js\"></script>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {
"tags": []
},
"execution_count": 1
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment