summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbdus <abdus@abdus.net>2020-12-06 17:34:07 +0530
committerAbdus <abdus@abdus.net>2020-12-06 17:34:07 +0530
commit673cd08e3580eaf69594c7f1d4424150213cd9d9 (patch)
treeb95851d48c4d6035005cd475e3b1b83e573c51c9
parent81a0dc9d26e1de6f0bf498c1e6e1d926d9de29e1 (diff)
downloadabdus.net-673cd08e3580eaf69594c7f1d4424150213cd9d9.tar.bz2
abdus.net-673cd08e3580eaf69594c7f1d4424150213cd9d9.zip
new post
-rw-r--r--content/notes/complete-ethical-hacking.md5
-rw-r--r--content/notes/javascript-object-prototype.md4
-rw-r--r--content/notes/regexp.md2
-rw-r--r--content/posts/generator-func-in-javascript.md11
-rw-r--r--themes/bronn/layouts/_default/single.html6
-rw-r--r--themes/bronn/static/css/layout.css9
-rw-r--r--themes/bronn/static/css/lineicons.css9
7 files changed, 35 insertions, 11 deletions
diff --git a/content/notes/complete-ethical-hacking.md b/content/notes/complete-ethical-hacking.md
index 68f919c..ed6dab5 100644
--- a/content/notes/complete-ethical-hacking.md
+++ b/content/notes/complete-ethical-hacking.md
@@ -1,10 +1,11 @@
---
title: "Complete Ethical Hacking"
date: 2020-10-20T23:40:32+05:30
-draft: true
+draft: false
tags: []
categories: []
-sources: []
+sources:
+ - https://academy.zerotomastery.io/courses/1134428
---
<!--
diff --git a/content/notes/javascript-object-prototype.md b/content/notes/javascript-object-prototype.md
index 7a49657..9fbc593 100644
--- a/content/notes/javascript-object-prototype.md
+++ b/content/notes/javascript-object-prototype.md
@@ -1,7 +1,7 @@
---
-title: "Javascript Object Prototype"
+title: "JavaScript Object Prototype"
date: 2020-09-24T13:24:30+05:30
-draft: true
+draft: false
tags: []
categories: []
sources: []
diff --git a/content/notes/regexp.md b/content/notes/regexp.md
index 9f8df3c..b5fc1f7 100644
--- a/content/notes/regexp.md
+++ b/content/notes/regexp.md
@@ -48,7 +48,7 @@ to find a **specific pattern in a text**.
| `?` | makes the preceeding symbol optional |
| `{n,m}` | match at least `n` but not more than `m` repetitions of preceeding symbol |
| `(abc)` | char group |
-| ` | ` | alteration. matches either the chars before or the chars after the symbol |
+| `|` | alteration. matches either the chars before or the chars after the symbol |
| `\` | escapes character |
| `^` | beginning of the input |
| `$` | end of the input |
diff --git a/content/posts/generator-func-in-javascript.md b/content/posts/generator-func-in-javascript.md
index 0a13ac2..69fb716 100644
--- a/content/posts/generator-func-in-javascript.md
+++ b/content/posts/generator-func-in-javascript.md
@@ -1,7 +1,7 @@
---
title: "Generator Functions in JavaScript (with real-world examples)"
date: 2020-11-12T18:54:26+05:30
-draft: true
+draft: false
meta:
image: https://i.ibb.co/QJqYYBn/f76eef870144.png # url to image. Important for blog listing and seo
description: # overrides .Summary
@@ -102,7 +102,7 @@ Below is an example to generate unique strings.
```javascript
function* GenerateUniqueID() {
let i = 0;
- while(true) {
+ while (true) {
const str = btoa(i);
i++;
yield str;
@@ -111,4 +111,9 @@ function* GenerateUniqueID() {
```
What this would do? It will simply create a Base64 representation of a given
-number.
+number. Use this output as classname/key/id for any HTML element.
+
+Another method could be to hash that number using MD5, SHA or similar. This way,
+the resultant string would always be equal in length.
+
+#wip
diff --git a/themes/bronn/layouts/_default/single.html b/themes/bronn/layouts/_default/single.html
index 08ee8a2..e617d87 100644
--- a/themes/bronn/layouts/_default/single.html
+++ b/themes/bronn/layouts/_default/single.html
@@ -26,6 +26,12 @@
</strong>
</p>
<!--.-->
+ {{ with .Params.sources }} {{ range . }}
+ <a href="{{ . }}" class="article-source"
+ ><i class="lni lni-invention"></i> {{ . }}</a
+ >
+ {{ end }} {{ end }}
+ <!--.-->
<div class="content">{{ .Content }}</div>
{{ range .Params.tags }}
<a class="btn btn-small" href='{{ printf "/tags/%s" . | absURL }}'
diff --git a/themes/bronn/static/css/layout.css b/themes/bronn/static/css/layout.css
index 6978457..540b2a8 100644
--- a/themes/bronn/static/css/layout.css
+++ b/themes/bronn/static/css/layout.css
@@ -483,6 +483,15 @@ footer a {
opacity: 0.4;
}
+.single-layout a.article-source {
+ color: #5465ff80;
+ font-weight: normal;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ display: block;
+}
+
.list-layout .btn,
.single-layout .btn {
color: #fff;
diff --git a/themes/bronn/static/css/lineicons.css b/themes/bronn/static/css/lineicons.css
index 033b20d..8704f4d 100644
--- a/themes/bronn/static/css/lineicons.css
+++ b/themes/bronn/static/css/lineicons.css
@@ -40,12 +40,15 @@
.lni-linkedin::before {
content: "\eb15";
}
-.lni-telegram::before {
- content: "\ebbc";
-}
+/*.lni-telegram::before {*/
+/*content: "\ebbc";*/
+/*}*/
.lni-menu::before {
content: "\eb29";
}
.lni-stackoverflow::before {
content: "\ebaa";
}
+.lni-invention:before {
+ content: "\eaf4";
+}